Anonymous committed 136c396

Couple fixes and tweaks, bumping to 0.3

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

Comments (0)

Files changed (5)

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

File contact_form/

 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/

 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/

+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
 from distutils.core import setup
-      version='0.2',
+      version='0.3',
       description='Generic contact-form application for Django',
       author='James Bennett',