From c3b101fae5fb1218ebad78b3439a4b5ae1f05142 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 3 Nov 2014 12:30:48 +0200 Subject: [PATCH] [1.7.x] Fixed versionchanged indentation in docs/. Backport of 5c517ec218 from master --- docs/howto/windows.txt | 4 ++-- docs/ref/contrib/sites.txt | 4 ++-- docs/ref/files/storage.txt | 19 ++++++++++--------- docs/ref/forms/formsets.txt | 2 +- docs/ref/models/instances.txt | 8 ++++---- docs/ref/models/options.txt | 4 ++-- docs/ref/models/querysets.txt | 10 ++++++---- docs/ref/templates/builtins.txt | 6 ++++-- docs/topics/email.txt | 14 +++++++------- docs/topics/http/sessions.txt | 4 ++-- docs/topics/serialization.txt | 12 ++++++------ 11 files changed, 46 insertions(+), 41 deletions(-) diff --git a/docs/howto/windows.txt b/docs/howto/windows.txt index d4e29d0b1b..4298ec847c 100644 --- a/docs/howto/windows.txt +++ b/docs/howto/windows.txt @@ -64,8 +64,8 @@ by executing ``django-admin.py --version`` in the command prompt. .. versionchanged:: 1.7 - In Django 1.7, a ``.exe`` has been introduced, so just use - ``django-admin`` in place of ``django-admin.py`` in the command prompt. + In Django 1.7, a ``.exe`` has been introduced, so just use + ``django-admin`` in place of ``django-admin.py`` in the command prompt. See :ref:`database-installation` for information on database installation with Django. diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt index 568339a0d1..b3f33c8da8 100644 --- a/docs/ref/contrib/sites.txt +++ b/docs/ref/contrib/sites.txt @@ -475,7 +475,7 @@ a fallback when the database-backed sites framework is not available. .. 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 interface to a normal :class:`~django.contrib.sites.models.Site` object, @@ -501,4 +501,4 @@ Finally, to avoid repetitive fallback code, the framework provides a .. 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``. diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt index f2578e7f63..1d84254f41 100644 --- a/docs/ref/files/storage.txt +++ b/docs/ref/files/storage.txt @@ -112,17 +112,18 @@ The Storage Class available for new content to be written to on the target storage 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 - If a file with ``name`` already exists, an underscore plus a random 7 - character alphanumeric string is appended to the filename before the - extension. - - Previously, an underscore followed by a number (e.g. ``"_1"``, ``"_2"``, - etc.) was appended to the filename until an available name in the - 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. + Previously, an underscore followed by a number (e.g. ``"_1"``, + ``"_2"``, etc.) was appended to the filename until an available + name in the 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) diff --git a/docs/ref/forms/formsets.txt b/docs/ref/forms/formsets.txt index 5b12732066..8ebc853c3f 100644 --- a/docs/ref/forms/formsets.txt +++ b/docs/ref/forms/formsets.txt @@ -20,4 +20,4 @@ Formset API reference. For introductory material about formsets, see the .. versionchanged:: 1.7 - The ``min_num`` and ``validate_min`` parameters were added. + The ``min_num`` and ``validate_min`` parameters were added. diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 8116fab3b5..e444067820 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -536,8 +536,8 @@ For example:: .. versionchanged:: 1.7 - In previous versions only instances of the exact same class and same - primary key value were considered equal. + In previous versions only instances of the exact same class and same + primary key value were considered equal. ``__hash__`` ------------ @@ -553,8 +553,8 @@ in Python`_). .. versionchanged:: 1.7 - In previous versions instance's without primary key value were - hashable. + In previous versions instance's without primary key value were + hashable. .. _is forbidden in Python: http://docs.python.org/reference/datamodel.html#object.__hash__ diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index ef56b251a0..6b0a931e69 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -323,8 +323,8 @@ Django quotes column and table names behind the scenes. .. versionchanged:: 1.7 - The ``ValidationError`` raised during model validation when the - constraint is violated has the ``unique_together`` error code. + The ``ValidationError`` raised during model validation when the + constraint is violated has the ``unique_together`` error code. ``index_together`` ------------------ diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 9fe3b61eec..d3f6653be2 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -825,12 +825,14 @@ If you need to clear the list of related fields added by past calls of >>> 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 -Chaining ``select_related`` calls now works in a similar way to other methods - -that is that ``select_related('foo', 'bar')`` is equivalent to -``select_related('foo').select_related('bar')``. Previously the latter would -have been equivalent to ``select_related('bar')``. + Previously the latter would have been equivalent to + ``select_related('bar')``. prefetch_related ~~~~~~~~~~~~~~~~ diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index e2a8da0fd7..fec7d9300f 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1139,14 +1139,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 (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 variable. It can be useful, for instance, in a :ttag:`blocktrans` like this:: {% widthratio this_value max_value max_width as width %} {% 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 with diff --git a/docs/topics/email.txt b/docs/topics/email.txt index a6b9aa56a3..6e8d433b7c 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -327,15 +327,15 @@ The class has the following methods: .. versionchanged:: 1.7 - If you specify a ``mimetype`` of ``message/rfc822``, it will also accept - :class:`django.core.mail.EmailMessage` and :py:class:`email.message.Message`. + If you specify a ``mimetype`` of ``message/rfc822``, it will also accept + :class:`django.core.mail.EmailMessage` and :py:class:`email.message.Message`. - In addition, ``message/rfc822`` attachments will no longer be - base64-encoded in violation of :rfc:`2046#section-5.2.1`, which can cause - issues with displaying the attachments in `Evolution`__ and `Thunderbird`__. + In addition, ``message/rfc822`` attachments will no longer be + base64-encoded in violation of :rfc:`2046#section-5.2.1`, which can cause + issues with displaying the attachments in `Evolution`__ and `Thunderbird`__. - __ https://bugzilla.gnome.org/show_bug.cgi?id=651197 - __ https://bugzilla.mozilla.org/show_bug.cgi?id=333880 + __ https://bugzilla.gnome.org/show_bug.cgi?id=651197 + __ https://bugzilla.mozilla.org/show_bug.cgi?id=333880 * ``attach_file()`` creates a new attachment using a file from your filesystem. Call it with the path of the file to attach and, optionally, diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index 3783b90101..85431b5b1c 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -97,8 +97,8 @@ configuration instructions for the `using database-backed sessions`_. .. versionchanged:: 1.7 -Before version 1.7, the ``cached_db`` backend always used the ``default`` cache -rather than the :setting:`SESSION_CACHE_ALIAS`. + Before version 1.7, the ``cached_db`` backend always used the ``default`` + cache rather than the :setting:`SESSION_CACHE_ALIAS`. Using file-based sessions ------------------------- diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt index 4ea9ccaa57..581694cc72 100644 --- a/docs/topics/serialization.txt +++ b/docs/topics/serialization.txt @@ -482,12 +482,12 @@ line flags to generate natural keys. .. versionchanged:: 1.7 -Previously there was only a ``use_natural_keys`` argument for -``serializers.serialize()`` and the `-n` or `--natural` command line flags. -These have been deprecated in favor of the ``use_natural_foreign_keys`` and -``use_natural_primary_keys`` arguments and the corresponding -:djadminopt:`--natural-foreign` and :djadminopt:`--natural-primary` options -for :djadmin:`dumpdata`. + Previously there was only a ``use_natural_keys`` argument for + ``serializers.serialize()`` and the `-n` or `--natural` command line flags. + These have been deprecated in favor of the ``use_natural_foreign_keys`` and + ``use_natural_primary_keys`` arguments and the corresponding + :djadminopt:`--natural-foreign` and :djadminopt:`--natural-primary` options + for :djadmin:`dumpdata`. The original argument and command line flags remain for backwards compatibility and map to the new ``use_natural_foreign_keys`` argument and