summaryrefslogtreecommitdiff
path: root/docs/topics/http
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-01-31 13:39:29 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-01-31 13:55:00 +0100
commit11ec0253ab4cc926ab9e77619132cb398231ac33 (patch)
tree8c5edfeb805fec819ac23b03d4dd022b583927b8 /docs/topics/http
parent256352a790baf8f71e114f0940cf230a273a16da (diff)
[1.5.x] Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
Thanks Tim for the report and initial patch. Backport of 89cb771 from master.
Diffstat (limited to 'docs/topics/http')
-rw-r--r--docs/topics/http/shortcuts.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt
index b1b4700b73..68860f123f 100644
--- a/docs/topics/http/shortcuts.txt
+++ b/docs/topics/http/shortcuts.txt
@@ -50,6 +50,9 @@ Optional arguments
The MIME type to use for the resulting document. Defaults to the value of
the :setting:`DEFAULT_CONTENT_TYPE` setting.
+ .. versionchanged:: 1.5
+ This parameter used to be called ``mimetype``.
+
``status``
The status code for the response. Defaults to ``200``.
@@ -87,7 +90,7 @@ This example is equivalent to::
``render_to_response``
======================
-.. function:: render_to_response(template_name[, dictionary][, context_instance][, mimetype])
+.. function:: render_to_response(template_name[, dictionary][, context_instance][, content_type])
Renders a given template with a given context dictionary and returns an
:class:`~django.http.HttpResponse` object with that rendered text.
@@ -121,10 +124,14 @@ Optional arguments
my_data_dictionary,
context_instance=RequestContext(request))
-``mimetype``
+``content_type``
The MIME type to use for the resulting document. Defaults to the value of
the :setting:`DEFAULT_CONTENT_TYPE` setting.
+ .. versionchanged:: 1.5
+ This parameter used to be called ``mimetype``.
+
+
Example
-------
@@ -148,7 +155,7 @@ This example is equivalent to::
t = loader.get_template('myapp/template.html')
c = Context({'foo': 'bar'})
return HttpResponse(t.render(c),
- mimetype="application/xhtml+xml")
+ content_type="application/xhtml+xml")
``redirect``
============