mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Refs #27829 -- Removed settings.DEFAULT_CONTENT_TYPE per deprecation timeline.
This commit is contained in:
parent
573ec714e5
commit
8045dff98c
11 changed files with 16 additions and 114 deletions
|
@ -83,7 +83,7 @@ Simple mixins
|
|||
|
||||
The content type to use for the response. ``content_type`` is passed
|
||||
as a keyword argument to ``response_class``. Default is ``None`` --
|
||||
meaning that Django uses :setting:`DEFAULT_CONTENT_TYPE`.
|
||||
meaning that Django uses ``'text/html'``.
|
||||
|
||||
**Methods**
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ Methods
|
|||
|
||||
``content_type`` is the MIME type optionally completed by a character set
|
||||
encoding and is used to fill the HTTP ``Content-Type`` header. If not
|
||||
specified, it is formed by the :setting:`DEFAULT_CONTENT_TYPE` and
|
||||
specified, it is formed by ``'text/html'`` and the
|
||||
:setting:`DEFAULT_CHARSET` settings, by default: "`text/html; charset=utf-8`".
|
||||
|
||||
``status`` is the :rfc:`HTTP status code <7231#section-6>` for the response.
|
||||
|
|
|
@ -1195,24 +1195,7 @@ See also :setting:`NUMBER_GROUPING`, :setting:`THOUSAND_SEPARATOR` and
|
|||
Default: ``'utf-8'``
|
||||
|
||||
Default charset to use for all ``HttpResponse`` objects, if a MIME type isn't
|
||||
manually specified. Used with :setting:`DEFAULT_CONTENT_TYPE` to construct the
|
||||
``Content-Type`` header.
|
||||
|
||||
.. setting:: DEFAULT_CONTENT_TYPE
|
||||
|
||||
``DEFAULT_CONTENT_TYPE``
|
||||
------------------------
|
||||
|
||||
Default: ``'text/html'``
|
||||
|
||||
Default content type to use for all ``HttpResponse`` objects, if a MIME type
|
||||
isn't manually specified. Used with :setting:`DEFAULT_CHARSET` to construct
|
||||
the ``Content-Type`` header.
|
||||
|
||||
.. deprecated:: 2.0
|
||||
|
||||
This setting is deprecated because it doesn't interact well with
|
||||
third-party apps and is obsolete since HTML5 has mostly superseded XHTML.
|
||||
manually specified. Used when constructing the ``Content-Type`` header.
|
||||
|
||||
.. setting:: DEFAULT_EXCEPTION_REPORTER_FILTER
|
||||
|
||||
|
@ -3436,7 +3419,6 @@ HTTP
|
|||
* :setting:`DATA_UPLOAD_MAX_MEMORY_SIZE`
|
||||
* :setting:`DATA_UPLOAD_MAX_NUMBER_FIELDS`
|
||||
* :setting:`DEFAULT_CHARSET`
|
||||
* :setting:`DEFAULT_CONTENT_TYPE`
|
||||
* :setting:`DISALLOWED_USER_AGENTS`
|
||||
* :setting:`FORCE_SCRIPT_NAME`
|
||||
* :setting:`INTERNAL_IPS`
|
||||
|
|
|
@ -76,7 +76,7 @@ Methods
|
|||
The value included in the HTTP ``Content-Type`` header, including the
|
||||
MIME type specification and the character set encoding. If
|
||||
``content_type`` is specified, then its value is used. Otherwise,
|
||||
:setting:`DEFAULT_CONTENT_TYPE` is used.
|
||||
``'text/html'`` is used.
|
||||
|
||||
``status``
|
||||
The HTTP status code for the response.
|
||||
|
@ -171,7 +171,7 @@ Methods
|
|||
The value included in the HTTP ``Content-Type`` header, including the
|
||||
MIME type specification and the character set encoding. If
|
||||
``content_type`` is specified, then its value is used. Otherwise,
|
||||
:setting:`DEFAULT_CONTENT_TYPE` is used.
|
||||
``'text/html'`` is used.
|
||||
|
||||
``status``
|
||||
The HTTP status code for the response.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue