1. Horst Gutmann
  2. django-contact-form-i18n


ubernostrum  committed 136c396

Couple fixes and tweaks, bumping to 0.3

  • Participants
  • Parent commits 886641f
  • Branches default
  • Tags v0.3

Comments (0)

Files changed (5)

File INSTALL.txt

View file
 The other method is to download a packaged version and use Python's
 ``distutils`` to install it onto your Python path::
-    wget http://django-contact-form.googlecode.com/files/contact_form-0.2.tar.gz
-    tar zxvf contact_form-0.2.tar.gz
-    cd contact-form-0.2
+    wget http://django-contact-form.googlecode.com/files/contact_form-0.3.tar.gz
+    tar zxvf contact_form-0.3.tar.gz
+    cd contact-form-0.3
     python setup.py install
 Depending on your system configuration, you may need to prefix the

File contact_form/forms.py

View file
 import sha
 from django import newforms as forms
 from django.conf import settings
 from django.core.mail import send_mail
 from django.template import loader, RequestContext
 from django.contrib.sites.models import Site
 # I put this on all required fields, because it's easier to pick up
 # on them with CSS or JavaScript if they have a class of "required"
 # in the HTML. Your mileage may vary.

File contact_form/urls.py

View file
 from django.conf.urls.defaults import *
 from django.views.generic.simple import direct_to_template
 from contact_form.views import contact_form
 urlpatterns = patterns('',
-                       url(r'^contact/$',
+                       url(r'^$',
-                       url(r'^contact/sent/$',
+                       url(r'^sent/$',
                            { 'template': 'contact_form/contact_form_sent.html' },

File contact_form/views.py

View file
+View which can render and send email from a contact form.
 from django.http import HttpResponseRedirect
 from django.shortcuts import render_to_response
 from django.template import RequestContext
 from django.contrib.auth.views import redirect_to_login
 from contact_form.forms import ContactForm
 def contact_form(request, form_class=ContactForm, template_name='contact_form/contact_form.html', success_url='/contact/sent/', login_required=False, fail_silently=False):
     Renders a contact form, validates its input and sends an email

File setup.py

View file
 from distutils.core import setup
-      version='0.2',
+      version='0.3',
       description='Generic contact-form application for Django',
       author='James Bennett',