Fixed #17322 -- Added an example import statement to the HttpResponse docs. Thanks, RoySmith
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
913b39b37f
commit
fefbb66bac
|
@ -536,6 +536,7 @@ Passing strings
|
||||||
Typical usage is to pass the contents of the page, as a string, to the
|
Typical usage is to pass the contents of the page, as a string, to the
|
||||||
:class:`HttpResponse` constructor::
|
:class:`HttpResponse` constructor::
|
||||||
|
|
||||||
|
>>> from django.http import HttpResponse
|
||||||
>>> response = HttpResponse("Here's the text of the Web page.")
|
>>> response = HttpResponse("Here's the text of the Web page.")
|
||||||
>>> response = HttpResponse("Text only, please.", mimetype="text/plain")
|
>>> response = HttpResponse("Text only, please.", mimetype="text/plain")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue