diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-01-31 13:39:29 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-01-31 13:54:40 +0100 |
| commit | 89cb771be7b53c40642872cdbedb15943bdf8e34 (patch) | |
| tree | 43b9e7addfe0d5f2ad99a569507f4c19562e4aef /docs/ref/template-response.txt | |
| parent | b2039d39d537340c1617f23d68b3f40f070e01db (diff) | |
Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
Thanks Tim for the report and initial patch.
Diffstat (limited to 'docs/ref/template-response.txt')
| -rw-r--r-- | docs/ref/template-response.txt | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index 3f5e772737..844b5fa46b 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -56,11 +56,11 @@ Attributes Methods ------- -.. method:: SimpleTemplateResponse.__init__(template, context=None, mimetype=None, status=None, content_type=None) +.. method:: SimpleTemplateResponse.__init__(template, context=None, content_type=None, status=None) Instantiates a :class:`~django.template.response.SimpleTemplateResponse` object - with the given template, context, MIME type and HTTP status. + with the given template, context, content type, and HTTP status. ``template`` The full name of a template, or a sequence of template names. @@ -75,12 +75,15 @@ Methods The HTTP Status code for the response. ``content_type`` - An alias for ``mimetype``. Historically, this parameter was only called - ``mimetype``, but since this is actually the value included in the HTTP - ``Content-Type`` header, it can also include the character set encoding, - which makes it more than just a MIME type specification. If ``mimetype`` - is specified (not ``None``), that value is used. Otherwise, - ``content_type`` is used. If neither is given, + + .. versionchanged:: 1.5 + + Historically, this parameter was only called ``mimetype`` (now + deprecated), but since this is actually the value included in the HTTP + ``Content-Type`` header, it can also include the character set + encoding, which makes it more than just a MIME type specification. If + ``mimetype`` is specified (not ``None``), that value is used. + Otherwise, ``content_type`` is used. If neither is given, :setting:`DEFAULT_CONTENT_TYPE` is used. @@ -144,7 +147,7 @@ TemplateResponse objects Methods ------- -.. method:: TemplateResponse.__init__(request, template, context=None, mimetype=None, status=None, content_type=None, current_app=None) +.. method:: TemplateResponse.__init__(request, template, context=None, content_type=None, status=None, current_app=None) Instantiates an ``TemplateResponse`` object with the given template, context, MIME type and HTTP status. @@ -165,12 +168,15 @@ Methods The HTTP Status code for the response. ``content_type`` - An alias for ``mimetype``. Historically, this parameter was only called - ``mimetype``, but since this is actually the value included in the HTTP - ``Content-Type`` header, it can also include the character set encoding, - which makes it more than just a MIME type specification. If ``mimetype`` - is specified (not ``None``), that value is used. Otherwise, - ``content_type`` is used. If neither is given, + + .. versionchanged:: 1.5 + + Historically, this parameter was only called ``mimetype`` (now + deprecated), but since this is actually the value included in the HTTP + ``Content-Type`` header, it can also include the character set + encoding, which makes it more than just a MIME type specification. If + ``mimetype`` is specified (not ``None``), that value is used. + Otherwise, ``content_type`` is used. If neither is given, :setting:`DEFAULT_CONTENT_TYPE` is used. ``current_app`` |
