1
0
mirror of https://github.com/django/django.git synced 2025-04-15 12:54:38 +00:00

[1.7.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 0d74209ef66111f29f122d5f5fdf8e2964890cc5 from master.
This commit is contained in:
Kevin Ndung'u 2014-11-23 20:47:28 +03:00 committed by Baptiste Mispelon
parent 2d06c112d1
commit 22d292e23b

View File

@ -188,6 +188,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', '')