mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Converted links to external topics so they use intersphinx extension markup.
This allows to make these links more resilent to changes in the target URLs. Thanks Jannis for the report and Aymeric Augustin for the patch. Fixes #16586. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -149,8 +149,8 @@ Three settings control Django's file upload behavior:
|
||||
|
||||
:setting:`FILE_UPLOAD_PERMISSIONS`
|
||||
The numeric mode (i.e. ``0644``) to set newly uploaded files to. For
|
||||
more information about what these modes mean, see the `documentation for
|
||||
os.chmod`_
|
||||
more information about what these modes mean, see the documentation for
|
||||
:func:`os.chmod`.
|
||||
|
||||
If this isn't given or is ``None``, you'll get operating-system
|
||||
dependent behavior. On most platforms, temporary files will have a mode
|
||||
@@ -179,8 +179,6 @@ Three settings control Django's file upload behavior:
|
||||
Which means "try to upload to memory first, then fall back to temporary
|
||||
files."
|
||||
|
||||
.. _documentation for os.chmod: http://docs.python.org/library/os.html#os.chmod
|
||||
|
||||
``UploadedFile`` objects
|
||||
========================
|
||||
|
||||
@@ -189,16 +187,16 @@ define the following methods/attributes:
|
||||
|
||||
.. attribute:: UploadedFile.content_type
|
||||
|
||||
The content-type header uploaded with the file (e.g. ``text/plain`` or
|
||||
``application/pdf``). Like any data supplied by the user, you shouldn't
|
||||
trust that the uploaded file is actually this type. You'll still need to
|
||||
validate that the file contains the content that the content-type header
|
||||
claims -- "trust but verify."
|
||||
The content-type header uploaded with the file (e.g. :mimetype:`text/plain`
|
||||
or :mimetype:`application/pdf`). Like any data supplied by the user, you
|
||||
shouldn't trust that the uploaded file is actually this type. You'll still
|
||||
need to validate that the file contains the content that the content-type
|
||||
header claims -- "trust but verify."
|
||||
|
||||
.. attribute:: UploadedFile.charset
|
||||
|
||||
For ``text/*`` content-types, the character set (i.e. ``utf8``) supplied
|
||||
by the browser. Again, "trust but verify" is the best policy here.
|
||||
For :mimetype:`text/*` content-types, the character set (i.e. ``utf8``)
|
||||
supplied by the browser. Again, "trust but verify" is the best policy here.
|
||||
|
||||
.. attribute:: UploadedFile.temporary_file_path()
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ Whether to use HTTPOnly flag on the session cookie. If this is set to
|
||||
session cookie.
|
||||
|
||||
HTTPOnly_ is a flag included in a Set-Cookie HTTP response header. It
|
||||
is not part of the RFC2109 standard for cookies, and it isn't honored
|
||||
is not part of the :rfc:`2109` standard for cookies, and it isn't honored
|
||||
consistently by all browsers. However, when it is honored, it can be a
|
||||
useful way to mitigate the risk of client side script accessing the
|
||||
protected cookie data.
|
||||
@@ -553,15 +553,13 @@ Technical details
|
||||
=================
|
||||
|
||||
* The session dictionary should accept any pickleable Python object. See
|
||||
`the pickle module`_ for more information.
|
||||
the :mod:`pickle` module for more information.
|
||||
|
||||
* Session data is stored in a database table named ``django_session`` .
|
||||
|
||||
* Django only sends a cookie if it needs to. If you don't set any session
|
||||
data, it won't send a session cookie.
|
||||
|
||||
.. _`the pickle module`: http://docs.python.org/library/pickle.html
|
||||
|
||||
Session IDs in URLs
|
||||
===================
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ Example
|
||||
-------
|
||||
|
||||
The following example renders the template ``myapp/index.html`` with the
|
||||
MIME type ``application/xhtml+xml``::
|
||||
MIME type :mimetype:`application/xhtml+xml`::
|
||||
|
||||
from django.shortcuts import render
|
||||
|
||||
@@ -131,7 +131,7 @@ Example
|
||||
-------
|
||||
|
||||
The following example renders the template ``myapp/index.html`` with the
|
||||
MIME type ``application/xhtml+xml``::
|
||||
MIME type :mimetype:`application/xhtml+xml`::
|
||||
|
||||
from django.shortcuts import render_to_response
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ default, call the view ``django.views.defaults.permission_denied``.
|
||||
|
||||
This view loads and renders the template ``403.html`` in your root template
|
||||
directory, or if this file does not exist, instead serves the text
|
||||
"403 Forbidden", as per RFC 2616 (the HTTP 1.1 Specification).
|
||||
"403 Forbidden", as per :rfc:`2616` (the HTTP 1.1 Specification).
|
||||
|
||||
It is possible to override ``django.views.defaults.permission_denied`` in the
|
||||
same way you can for the 404 and 500 views by specifying a ``handler403`` in
|
||||
|
||||
Reference in New Issue
Block a user