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:
parent
a875f612e0
commit
7d06f975fe
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user