mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts: docs/ref/django-admin.txt
This commit is contained in:
@@ -132,7 +132,7 @@ upload behavior.
|
||||
Changing upload handler behavior
|
||||
--------------------------------
|
||||
|
||||
Three settings control Django's file upload behavior:
|
||||
There are a few settings which control Django's file upload behavior:
|
||||
|
||||
:setting:`FILE_UPLOAD_MAX_MEMORY_SIZE`
|
||||
The maximum size, in bytes, for files that will be uploaded into memory.
|
||||
@@ -167,6 +167,11 @@ Three settings control Django's file upload behavior:
|
||||
|
||||
**Always prefix the mode with a 0.**
|
||||
|
||||
:setting:`FILE_UPLOAD_DIRECTORY_PERMISSIONS`
|
||||
The numeric mode to apply to directories created in the process of
|
||||
uploading files. This value mirrors the functionality and caveats of
|
||||
the :setting:`FILE_UPLOAD_PERMISSIONS` setting.
|
||||
|
||||
:setting:`FILE_UPLOAD_HANDLERS`
|
||||
The actual handlers for uploaded files. Changing this setting allows
|
||||
complete customization -- even replacement -- of Django's upload
|
||||
|
||||
@@ -204,11 +204,6 @@ reverse order, from the bottom up. This means classes defined at the end of
|
||||
Dealing with streaming responses
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
``response`` may also be an :class:`~django.http.StreamingHttpResponse`
|
||||
object.
|
||||
|
||||
Unlike :class:`~django.http.HttpResponse`,
|
||||
:class:`~django.http.StreamingHttpResponse` does not have a ``content``
|
||||
attribute. As a result, middleware can no longer assume that all responses
|
||||
|
||||
@@ -70,10 +70,6 @@ If you have multiple caches defined in :setting:`CACHES`, Django will use the
|
||||
default cache. To use another cache, set :setting:`SESSION_CACHE_ALIAS` to the
|
||||
name of that cache.
|
||||
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
The :setting:`SESSION_CACHE_ALIAS` setting was added.
|
||||
|
||||
Once your cache is configured, you've got two choices for how to store data in
|
||||
the cache:
|
||||
|
||||
@@ -302,8 +298,6 @@ You can edit it multiple times.
|
||||
|
||||
.. method:: SessionBase.clear_expired
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
Removes expired sessions from the session store. This class method is
|
||||
called by :djadmin:`clearsessions`.
|
||||
|
||||
@@ -469,9 +463,7 @@ cookie will be sent on every request.
|
||||
Similarly, the ``expires`` part of a session cookie is updated each time the
|
||||
session cookie is sent.
|
||||
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
The session is not saved if the response's status code is 500.
|
||||
The session is not saved if the response's status code is 500.
|
||||
|
||||
.. _browser-length-vs-persistent-sessions:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ introduce controlled coupling for convenience's sake.
|
||||
:class:`~django.http.HttpResponse` object with that rendered text.
|
||||
|
||||
:func:`render()` is the same as a call to
|
||||
:func:`render_to_response()` with a `context_instance` argument that
|
||||
:func:`render_to_response()` with a ``context_instance`` argument that
|
||||
forces the use of a :class:`~django.template.RequestContext`.
|
||||
|
||||
Required arguments
|
||||
@@ -50,10 +50,6 @@ 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``.
|
||||
|
||||
@@ -129,11 +125,6 @@ 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``.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
@@ -169,7 +160,8 @@ This example is equivalent to::
|
||||
|
||||
The arguments could be:
|
||||
|
||||
* A model: the model's `get_absolute_url()` function will be called.
|
||||
* A model: the model's `:meth:`~django.db.models.Model.get_absolute_url()`
|
||||
function will be called.
|
||||
|
||||
* A view name, possibly with arguments: :func:`urlresolvers.reverse
|
||||
<django.core.urlresolvers.reverse>` will be used to reverse-resolve the
|
||||
|
||||
Reference in New Issue
Block a user