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

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

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