summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/actions.txt4
-rw-r--r--docs/ref/template-response.txt36
2 files changed, 22 insertions, 18 deletions
diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt
index d7eef623d5..0a302ecd1d 100644
--- a/docs/ref/contrib/admin/actions.txt
+++ b/docs/ref/contrib/admin/actions.txt
@@ -223,7 +223,7 @@ objects as JSON::
from django.core import serializers
def export_as_json(modeladmin, request, queryset):
- response = HttpResponse(mimetype="text/javascript")
+ response = HttpResponse(content_type="application/json")
serializers.serialize("json", queryset, stream=response)
return response
@@ -356,5 +356,3 @@ Conditionally enabling or disabling actions
if 'delete_selected' in actions:
del actions['delete_selected']
return actions
-
-
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``