Fixed #18614 -- Added missing imports in code samples.

This commit is contained in:
Florian Apolloner 2012-07-25 22:32:31 +02:00
parent a875f612e0
commit 7d06f975fe
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,9 @@ The standard pattern for processing a form in a view looks like this:
.. code-block:: python
from django.shortcuts import render
from django.http import HttpResponseRedirect
def contact(request):
if request.method == 'POST': # If the form has been submitted...
form = ContactForm(request.POST) # A form bound to the POST data