mirror of
https://github.com/django/django.git
synced 2025-08-11 22:38:20 +00:00
[1.6.x] Fixed #23900 -- Added missing imports in code example.
The Preventing header injection example included
classes that are not imported.
Thanks to Collin Anderson and Berker Peksağ for the
reviews.
Backport of 0d74209ef6
from master.
This commit is contained in:
parent
61be9373af
commit
db227d9d20
1 changed files with 1 additions and 0 deletions
|
@ -174,6 +174,7 @@ from the request's POST data, sends that to admin@example.com and redirects to
|
|||
"/contact/thanks/" when it's done::
|
||||
|
||||
from django.core.mail import send_mail, BadHeaderError
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
|
||||
def send_email(request):
|
||||
subject = request.POST.get('subject', '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue