Commits

ubernostrum  committed 4f793ea

Little bit of style cleanup

  • Participants
  • Parent commits 93030a8

Comments (0)

Files changed (1)

File contact_form/views.py

 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):
+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 it.
         return redirect_to_login(request.path)
     
     if request.method == 'POST':
-        form = form_class(request.POST, request=request)
+        form = form_class(data=request.POST, request=request)
         if form.is_valid():
             form.save(fail_silently=fail_silently)
             return HttpResponseRedirect(success_url)