From 0d74209ef66111f29f122d5f5fdf8e2964890cc5 Mon Sep 17 00:00:00 2001 From: Kevin Ndung'u Date: Sun, 23 Nov 2014 20:47:28 +0300 Subject: [PATCH] Fixed #23900 -- Added missing imports in code example. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Preventing header injection example included classes that are not imported. Thanks to Collin Anderson and Berker Peksağ for the reviews. --- docs/topics/email.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/topics/email.txt b/docs/topics/email.txt index c49e9ed9ee..7333ae7110 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -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', '')