mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
[soc2009/http-wsgi-improvements] Update versions in docs for the various new HttpResponse features, and fixed an error on the argument list for HttpResponse.__init__.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b15984b179
commit
bcec8b2c43
@ -7,6 +7,8 @@ How to serve large files via HttpResponseSendFile
|
|||||||
.. module:: django.http
|
.. module:: django.http
|
||||||
:synopsis: Serving of large files via handler-specific mechanisms.
|
:synopsis: Serving of large files via handler-specific mechanisms.
|
||||||
|
|
||||||
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
There are cases when you may wish to serve files in a response, but only want
|
There are cases when you may wish to serve files in a response, but only want
|
||||||
to provide access to them through your application. As discussed in :ref:`the how-to for serving static
|
to provide access to them through your application. As discussed in :ref:`the how-to for serving static
|
||||||
files <howto-static-files>`, Django is not tuned at all for this sort of serving. Thus,
|
files <howto-static-files>`, Django is not tuned at all for this sort of serving. Thus,
|
||||||
|
@ -502,6 +502,8 @@ Methods
|
|||||||
Otherwise, ``content_type`` is used. If neither is given, the
|
Otherwise, ``content_type`` is used. If neither is given, the
|
||||||
``DEFAULT_CONTENT_TYPE`` setting is used.
|
``DEFAULT_CONTENT_TYPE`` setting is used.
|
||||||
|
|
||||||
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
``request`` is the request that triggered this response. It can be used in
|
``request`` is the request that triggered this response. It can be used in
|
||||||
the event that a view cares about dealing with request headers, in
|
the event that a view cares about dealing with request headers, in
|
||||||
particular the Accept-Charset header.
|
particular the Accept-Charset header.
|
||||||
@ -577,7 +579,7 @@ live in :mod:`django.http`.
|
|||||||
|
|
||||||
.. class:: HttpResponseSendFile
|
.. class:: HttpResponseSendFile
|
||||||
|
|
||||||
.. versionadded:: 1.1
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
A special response class for efficient file serving. It informs the HTTP
|
A special response class for efficient file serving. It informs the HTTP
|
||||||
protocol handler to use platform-specific file serving mechanism (if
|
protocol handler to use platform-specific file serving mechanism (if
|
||||||
@ -599,7 +601,7 @@ live in :mod:`django.http`.
|
|||||||
|
|
||||||
.. class:: HttpResponseStreaming
|
.. class:: HttpResponseStreaming
|
||||||
|
|
||||||
.. versionadded:: 1.1
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
A special response class that does not consume generators before returning
|
A special response class that does not consume generators before returning
|
||||||
the response. To do this, it bypasses middleware that is not useful for
|
the response. To do this, it bypasses middleware that is not useful for
|
||||||
|
@ -838,6 +838,8 @@ link). This is only used if ``CommonMiddleware`` is installed (see
|
|||||||
SENDFILE_HEADER
|
SENDFILE_HEADER
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
Default: ``None``
|
Default: ``None``
|
||||||
|
|
||||||
If not ``None``, this defines the header that an :func:`~django.http.HttpResponseSendFile`
|
If not ``None``, this defines the header that an :func:`~django.http.HttpResponseSendFile`
|
||||||
|
@ -17,7 +17,7 @@ introduce controlled coupling for convenience's sake.
|
|||||||
``render_to_response``
|
``render_to_response``
|
||||||
======================
|
======================
|
||||||
|
|
||||||
.. function:: render_to_response(template[, dictionary][, context_instance][, mimetype, content_type, status])
|
.. function:: render_to_response(template[, dictionary][, context_instance][, mimetype, content_type, request])
|
||||||
|
|
||||||
Renders a given template with a given context dictionary and returns an
|
Renders a given template with a given context dictionary and returns an
|
||||||
:class:`~django.http.HttpResponse` object with that rendered text.
|
:class:`~django.http.HttpResponse` object with that rendered text.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user