mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00: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
|
.. code-block:: python
|
||||||
|
|
||||||
|
from django.shortcuts import render
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
|
||||||
def contact(request):
|
def contact(request):
|
||||||
if request.method == 'POST': # If the form has been submitted...
|
if request.method == 'POST': # If the form has been submitted...
|
||||||
form = ContactForm(request.POST) # A form bound to the POST data
|
form = ContactForm(request.POST) # A form bound to the POST data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user