0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #21847 -- Clarified where ContactForm was defined

This commit is contained in:
Tom Atkins 2014-01-23 16:26:15 +00:00 committed by Tim Graham
parent d01edbcdda
commit 3b869b09d0

View File

@ -96,6 +96,7 @@ The standard pattern for processing a form in a view looks like this:
def contact(request):
if request.method == 'POST': # If the form has been submitted...
# ContactForm was defined in the the previous section
form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
# Process the data in form.cleaned_data