summaryrefslogtreecommitdiff
path: root/docs/topics
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:54:40 +0100
commit89cb771be7b53c40642872cdbedb15943bdf8e34 (patch)
tree43b9e7addfe0d5f2ad99a569507f4c19562e4aef /docs/topics
parentb2039d39d537340c1617f23d68b3f40f070e01db (diff)
Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
Thanks Tim for the report and initial patch.
Diffstat (limited to 'docs/topics')
-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``
============