Procházet zdrojové kódy

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.
Kevin Ndung'u před 10 roky
rodič
revize
0d74209ef6
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      docs/topics/email.txt

+ 1 - 0
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', '')