--- python-django-contact-form-0+hg61.orig/debian/control +++ python-django-contact-form-0+hg61/debian/control @@ -0,0 +1,23 @@ +Source: python-django-contact-form +Section: python +Priority: optional +Maintainer: Daniel Watkins +Uploaders: Debian Python Modules Team +Build-Depends: debhelper (>= 7), python, python-support, quilt +Standards-Version: 3.8.1 +Homepage: http://bitbucket.org/ubernostrum/django-contact-form/overview/ +Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-django-contact-form/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-django-contact-form/trunk/ + +Package: python-django-contact-form +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, python-django (>= 1.0) +Description: extensible contact-form application for Django + This is a reusable application which simplifies including a contact form within + Django, the Python web framework. Out of the box it provides a basic contact + form which, once appropriate templates have been written, will email site + administrators when the form is submitted. + . + The form and view used are designed to be extensible to allow for easy + adaptation to more complex needs. It also features built-in integration with + the Akismet web service, to simplify spam filtering. --- python-django-contact-form-0+hg61.orig/debian/copyright +++ python-django-contact-form-0+hg61/debian/copyright @@ -0,0 +1,39 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat +Upstream-Name: django-contact-form +Upstream-Maintainer: James Bennett +Upstream-Source: https://bitbucket.org/ubernostrum/django-contact-form/ + +Files: * +Copyright: Copyright (c) 2007, James Bennett +License: BSD + +Files: debian/* +Copyright: Copyright © 2009 Daniel Watkins +License: BSD + +License: BSD + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the author nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- python-django-contact-form-0+hg61.orig/debian/rules +++ python-django-contact-form-0+hg61/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +clean: unpatch + dh $@ + +build: patch + dh $@ + +install: build + dh $@ + +binary-indep: install + dh $@ + +binary-arch: + +binary: binary-arch binary-indep + dh $@ + +get-orig-source: + hg clone https://bitbucket.org/ubernostrum/django-contact-form/ + set -e; \ + revno=`hg tip --template "{rev}" -R django-contact-form` \ + dirname=python-django-contact-form-0+hg$$revno; \ + hg archive -R django-contact-form $$dirname; \ + rm $$dirname/.hg*; \ + tar zcf python-django-contact-form_0+hg$$revno.orig.tar.gz $$dirname; \ + rm -rf django-contact-form $$dirname --- python-django-contact-form-0+hg61.orig/debian/docs +++ python-django-contact-form-0+hg61/debian/docs @@ -0,0 +1,2 @@ +README.txt +docs/* --- python-django-contact-form-0+hg61.orig/debian/changelog +++ python-django-contact-form-0+hg61/debian/changelog @@ -0,0 +1,13 @@ +python-django-contact-form (0+hg61-2) unstable; urgency=low + + * Fixed get-orig-source rule so that the source directory is named correctly. + * Added 01-add_form_args.diff patch. (Closes: #526451) + * Bumped Standards-Version. + + -- Daniel Watkins Fri, 01 May 2009 11:29:42 +0100 + +python-django-contact-form (0+hg61-1) unstable; urgency=low + + * Initial release. (Closes: #518460) + + -- Daniel Watkins Fri, 06 Mar 2009 10:41:37 +0000 --- python-django-contact-form-0+hg61.orig/debian/watch +++ python-django-contact-form-0+hg61/debian/watch @@ -0,0 +1 @@ +# This is a Mercurial snapshot, so a watch file is impractical. --- python-django-contact-form-0+hg61.orig/debian/compat +++ python-django-contact-form-0+hg61/debian/compat @@ -0,0 +1 @@ +7 --- python-django-contact-form-0+hg61.orig/debian/patches/series +++ python-django-contact-form-0+hg61/debian/patches/series @@ -0,0 +1 @@ +01-add_form_args.diff --- python-django-contact-form-0+hg61.orig/debian/patches/01-add_form_args.diff +++ python-django-contact-form-0+hg61/debian/patches/01-add_form_args.diff @@ -0,0 +1,41 @@ +## 01-add_form_args.diff by Daniel Watkins +## +## Add a form_args argument to the contact_form view, which is passed +## through to the form_class being used. + +Index: django-contact-form/contact_form/views.py +=================================================================== +--- django-contact-form.orig/contact_form/views.py 2009-05-01 11:20:54.000000000 +0100 ++++ django-contact-form/contact_form/views.py 2009-05-01 11:20:58.000000000 +0100 +@@ -14,7 +14,7 @@ + def contact_form(request, form_class=ContactForm, + template_name='contact_form/contact_form.html', + success_url=None, extra_context=None, +- fail_silently=False): ++ fail_silently=False, form_args=None): + """ + Render a contact form, validate its input and send an email + from it. +@@ -71,15 +71,20 @@ + # but contact_form/urls.py in turn imports from this module. + # + ++ if form_args is None: ++ form_args = () + if success_url is None: + success_url = reverse('contact_form_sent') + if request.method == 'POST': +- form = form_class(data=request.POST, files=request.FILES, request=request) ++ form = form_class(data=request.POST, ++ files=request.FILES, ++ request=request, ++ *form_args) + if form.is_valid(): + form.save(fail_silently=fail_silently) + return HttpResponseRedirect(success_url) + else: +- form = form_class(request=request) ++ form = form_class(request=request, *form_args) + + if extra_context is None: + extra_context = {}