mirror of https://github.com/django/django.git
Fixed versionchanged indentation in docs/.
This commit is contained in:
parent
a71a2ea756
commit
5c517ec218
|
@ -64,8 +64,8 @@ by executing ``django-admin --version`` in the command prompt.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
In Django 1.7, a ``.exe`` has been introduced, so just use
|
In Django 1.7, a ``.exe`` has been introduced, so just use
|
||||||
``django-admin`` in place of ``django-admin.py`` in the command prompt.
|
``django-admin`` in place of ``django-admin.py`` in the command prompt.
|
||||||
|
|
||||||
See :ref:`database-installation` for information on database installation
|
See :ref:`database-installation` for information on database installation
|
||||||
with Django.
|
with Django.
|
||||||
|
|
|
@ -474,7 +474,7 @@ a fallback when the database-backed sites framework is not available.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
This class used to be defined in ``django.contrib.sites.models``.
|
This class used to be defined in ``django.contrib.sites.models``.
|
||||||
|
|
||||||
A :class:`~django.contrib.sites.requests.RequestSite` object has a similar
|
A :class:`~django.contrib.sites.requests.RequestSite` object has a similar
|
||||||
interface to a normal :class:`~django.contrib.sites.models.Site` object,
|
interface to a normal :class:`~django.contrib.sites.models.Site` object,
|
||||||
|
@ -500,10 +500,10 @@ Finally, to avoid repetitive fallback code, the framework provides a
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
This function used to be defined in ``django.contrib.sites.models``.
|
This function used to be defined in ``django.contrib.sites.models``.
|
||||||
|
|
||||||
.. versionchanged:: 1.8
|
.. versionchanged:: 1.8
|
||||||
|
|
||||||
This function will now lookup the current site based on
|
This function will now lookup the current site based on
|
||||||
:meth:`request.get_host() <django.http.HttpRequest.get_host>` if the
|
:meth:`request.get_host() <django.http.HttpRequest.get_host>` if the
|
||||||
:setting:`SITE_ID` setting is not defined.
|
:setting:`SITE_ID` setting is not defined.
|
||||||
|
|
|
@ -112,17 +112,18 @@ The Storage Class
|
||||||
available for new content to be written to on the target storage
|
available for new content to be written to on the target storage
|
||||||
system.
|
system.
|
||||||
|
|
||||||
|
If a file with ``name`` already exists, an underscore plus a random
|
||||||
|
7 character alphanumeric string is appended to the filename before
|
||||||
|
the extension.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
If a file with ``name`` already exists, an underscore plus a random 7
|
Previously, an underscore followed by a number (e.g. ``"_1"``,
|
||||||
character alphanumeric string is appended to the filename before the
|
``"_2"``, etc.) was appended to the filename until an available
|
||||||
extension.
|
name in the destination directory was found. A malicious user could
|
||||||
|
exploit this deterministic algorithm to create a denial-of-service
|
||||||
Previously, an underscore followed by a number (e.g. ``"_1"``, ``"_2"``,
|
attack. This change was also made in Django 1.6.6, 1.5.9, and
|
||||||
etc.) was appended to the filename until an available name in the
|
1.4.14.
|
||||||
destination directory was found. A malicious user could exploit this
|
|
||||||
deterministic algorithm to create a denial-of-service attack. This
|
|
||||||
change was also made in Django 1.6.6, 1.5.9, and 1.4.14.
|
|
||||||
|
|
||||||
.. method:: get_valid_name(name)
|
.. method:: get_valid_name(name)
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@ Formset API reference. For introductory material about formsets, see the
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
The ``min_num`` and ``validate_min`` parameters were added.
|
The ``min_num`` and ``validate_min`` parameters were added.
|
||||||
|
|
|
@ -604,8 +604,8 @@ For example::
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
In previous versions only instances of the exact same class and same
|
In previous versions only instances of the exact same class and same
|
||||||
primary key value were considered equal.
|
primary key value were considered equal.
|
||||||
|
|
||||||
``__hash__``
|
``__hash__``
|
||||||
------------
|
------------
|
||||||
|
@ -621,8 +621,8 @@ in Python`_).
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
In previous versions instance's without primary key value were
|
In previous versions instance's without primary key value were
|
||||||
hashable.
|
hashable.
|
||||||
|
|
||||||
.. _is forbidden in Python: http://docs.python.org/reference/datamodel.html#object.__hash__
|
.. _is forbidden in Python: http://docs.python.org/reference/datamodel.html#object.__hash__
|
||||||
|
|
||||||
|
|
|
@ -338,8 +338,8 @@ Django quotes column and table names behind the scenes.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
The ``ValidationError`` raised during model validation when the
|
The ``ValidationError`` raised during model validation when the
|
||||||
constraint is violated has the ``unique_together`` error code.
|
constraint is violated has the ``unique_together`` error code.
|
||||||
|
|
||||||
``index_together``
|
``index_together``
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -819,12 +819,14 @@ If you need to clear the list of related fields added by past calls of
|
||||||
|
|
||||||
>>> without_relations = queryset.select_related(None)
|
>>> without_relations = queryset.select_related(None)
|
||||||
|
|
||||||
|
Chaining ``select_related`` calls works in a similar way to other methods -
|
||||||
|
that is that ``select_related('foo', 'bar')`` is equivalent to
|
||||||
|
``select_related('foo').select_related('bar')``.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
Chaining ``select_related`` calls now works in a similar way to other methods -
|
Previously the latter would have been equivalent to
|
||||||
that is that ``select_related('foo', 'bar')`` is equivalent to
|
``select_related('bar')``.
|
||||||
``select_related('foo').select_related('bar')``. Previously the latter would
|
|
||||||
have been equivalent to ``select_related('bar')``.
|
|
||||||
|
|
||||||
prefetch_related
|
prefetch_related
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -1142,14 +1142,16 @@ If ``this_value`` is 175, ``max_value`` is 200, and ``max_width`` is 100, the
|
||||||
image in the above example will be 88 pixels wide
|
image in the above example will be 88 pixels wide
|
||||||
(because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88).
|
(because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88).
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
In some cases you might want to capture the result of ``widthratio`` in a
|
In some cases you might want to capture the result of ``widthratio`` in a
|
||||||
variable. It can be useful, for instance, in a :ttag:`blocktrans` like this::
|
variable. It can be useful, for instance, in a :ttag:`blocktrans` like this::
|
||||||
|
|
||||||
{% widthratio this_value max_value max_width as width %}
|
{% widthratio this_value max_value max_width as width %}
|
||||||
{% blocktrans %}The width is: {{ width }}{% endblocktrans %}
|
{% blocktrans %}The width is: {{ width }}{% endblocktrans %}
|
||||||
|
|
||||||
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
|
The ability to use "as" with this tag like in the example above was added.
|
||||||
|
|
||||||
.. templatetag:: with
|
.. templatetag:: with
|
||||||
|
|
||||||
with
|
with
|
||||||
|
|
|
@ -327,15 +327,15 @@ The class has the following methods:
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
If you specify a ``mimetype`` of ``message/rfc822``, it will also accept
|
If you specify a ``mimetype`` of ``message/rfc822``, it will also accept
|
||||||
:class:`django.core.mail.EmailMessage` and :py:class:`email.message.Message`.
|
:class:`django.core.mail.EmailMessage` and :py:class:`email.message.Message`.
|
||||||
|
|
||||||
In addition, ``message/rfc822`` attachments will no longer be
|
In addition, ``message/rfc822`` attachments will no longer be
|
||||||
base64-encoded in violation of :rfc:`2046#section-5.2.1`, which can cause
|
base64-encoded in violation of :rfc:`2046#section-5.2.1`, which can cause
|
||||||
issues with displaying the attachments in `Evolution`__ and `Thunderbird`__.
|
issues with displaying the attachments in `Evolution`__ and `Thunderbird`__.
|
||||||
|
|
||||||
__ https://bugzilla.gnome.org/show_bug.cgi?id=651197
|
__ https://bugzilla.gnome.org/show_bug.cgi?id=651197
|
||||||
__ https://bugzilla.mozilla.org/show_bug.cgi?id=333880
|
__ https://bugzilla.mozilla.org/show_bug.cgi?id=333880
|
||||||
|
|
||||||
* ``attach_file()`` creates a new attachment using a file from your
|
* ``attach_file()`` creates a new attachment using a file from your
|
||||||
filesystem. Call it with the path of the file to attach and, optionally,
|
filesystem. Call it with the path of the file to attach and, optionally,
|
||||||
|
|
|
@ -578,8 +578,6 @@ over them:
|
||||||
</ol>
|
</ol>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. versionchanged:: 1.8
|
|
||||||
|
|
||||||
Non-field errors (and/or hidden field errors that are rendered at the top of
|
Non-field errors (and/or hidden field errors that are rendered at the top of
|
||||||
the form when using helpers like ``form.as_p()``) will be rendered with an
|
the form when using helpers like ``form.as_p()``) will be rendered with an
|
||||||
additional class of ``nonfield`` to help distinguish them from field-specific
|
additional class of ``nonfield`` to help distinguish them from field-specific
|
||||||
|
@ -591,6 +589,10 @@ errors. For example, ``{{ form.non_field_errors }}`` would look like:
|
||||||
<li>Generic validation error</li>
|
<li>Generic validation error</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
.. versionchanged:: 1.8
|
||||||
|
|
||||||
|
The "nonfield" class as described in the example above was added.
|
||||||
|
|
||||||
See :doc:`/ref/forms/api` for more on errors, styling, and working with form
|
See :doc:`/ref/forms/api` for more on errors, styling, and working with form
|
||||||
attributes in templates.
|
attributes in templates.
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ configuration instructions for the `using database-backed sessions`_.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
Before version 1.7, the ``cached_db`` backend always used the ``default`` cache
|
Before version 1.7, the ``cached_db`` backend always used the ``default``
|
||||||
rather than the :setting:`SESSION_CACHE_ALIAS`.
|
cache rather than the :setting:`SESSION_CACHE_ALIAS`.
|
||||||
|
|
||||||
Using file-based sessions
|
Using file-based sessions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -476,12 +476,12 @@ line flags to generate natural keys.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
Previously there was only a ``use_natural_keys`` argument for
|
Previously there was only a ``use_natural_keys`` argument for
|
||||||
``serializers.serialize()`` and the `-n` or `--natural` command line flags.
|
``serializers.serialize()`` and the `-n` or `--natural` command line flags.
|
||||||
These have been deprecated in favor of the ``use_natural_foreign_keys`` and
|
These have been deprecated in favor of the ``use_natural_foreign_keys`` and
|
||||||
``use_natural_primary_keys`` arguments and the corresponding
|
``use_natural_primary_keys`` arguments and the corresponding
|
||||||
:djadminopt:`--natural-foreign` and :djadminopt:`--natural-primary` options
|
:djadminopt:`--natural-foreign` and :djadminopt:`--natural-primary` options
|
||||||
for :djadmin:`dumpdata`.
|
for :djadmin:`dumpdata`.
|
||||||
|
|
||||||
The original argument and command line flags remain for backwards
|
The original argument and command line flags remain for backwards
|
||||||
compatibility and map to the new ``use_natural_foreign_keys`` argument and
|
compatibility and map to the new ``use_natural_foreign_keys`` argument and
|
||||||
|
|
Loading…
Reference in New Issue