Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
This commit is contained in:
parent
1ddeeb5b8e
commit
78c842a323
|
@ -66,7 +66,7 @@ class VersionDirective(Directive):
|
||||||
msg = """Only one argument accepted for directive '{directive_name}::'.
|
msg = """Only one argument accepted for directive '{directive_name}::'.
|
||||||
Comments should be provided as content,
|
Comments should be provided as content,
|
||||||
not as an extra argument.""".format(directive_name=self.name)
|
not as an extra argument.""".format(directive_name=self.name)
|
||||||
raise ValueError(msg)
|
raise self.error(msg)
|
||||||
|
|
||||||
env = self.state.document.settings.env
|
env = self.state.document.settings.env
|
||||||
ret = []
|
ret = []
|
||||||
|
|
|
@ -105,6 +105,7 @@ TemplateView
|
||||||
in the URL.
|
in the URL.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The context used to be populated with a ``{{ params }}`` dictionary of
|
The context used to be populated with a ``{{ params }}`` dictionary of
|
||||||
the parameters captured in the URL. Now those parameters are first-level
|
the parameters captured in the URL. Now those parameters are first-level
|
||||||
context variables.
|
context variables.
|
||||||
|
|
|
@ -330,5 +330,6 @@ BaseDateListView
|
||||||
:meth:`QuerySet.dates()<django.db.models.query.QuerySet.dates>`.
|
:meth:`QuerySet.dates()<django.db.models.query.QuerySet.dates>`.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The ``ordering`` parameter was added, and the default order was
|
The ``ordering`` parameter was added, and the default order was
|
||||||
changed to ascending.
|
changed to ascending.
|
||||||
|
|
|
@ -67,7 +67,6 @@ TemplateResponseMixin
|
||||||
.. attribute:: content_type
|
.. attribute:: content_type
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
The ``content_type`` attribute was added.
|
|
||||||
|
|
||||||
The content type to use for the response. ``content_type`` is passed
|
The content type to use for the response. ``content_type`` is passed
|
||||||
as a keyword argument to ``response_class``. Default is ``None`` --
|
as a keyword argument to ``response_class``. Default is ``None`` --
|
||||||
|
|
|
@ -62,6 +62,7 @@ To set the same ``X-Frame-Options`` value for all responses in your site, put
|
||||||
)
|
)
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
This middleware is enabled in the settings file generated by
|
This middleware is enabled in the settings file generated by
|
||||||
:djadmin:`startproject`.
|
:djadmin:`startproject`.
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ The admin is enabled in the default project template used by
|
||||||
:djadmin:`startproject`.
|
:djadmin:`startproject`.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
In previous versions, the admin wasn't enabled by default.
|
In previous versions, the admin wasn't enabled by default.
|
||||||
|
|
||||||
For reference, here are the requirements:
|
For reference, here are the requirements:
|
||||||
|
@ -1341,6 +1342,7 @@ templates used by the :class:`ModelAdmin` views:
|
||||||
return qs.filter(author=request.user)
|
return qs.filter(author=request.user)
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The ``get_queryset`` method was previously named ``queryset``.
|
The ``get_queryset`` method was previously named ``queryset``.
|
||||||
|
|
||||||
.. method:: ModelAdmin.message_user(request, message, level=messages.INFO, extra_tags='', fail_silently=False)
|
.. method:: ModelAdmin.message_user(request, message, level=messages.INFO, extra_tags='', fail_silently=False)
|
||||||
|
@ -1348,7 +1350,9 @@ templates used by the :class:`ModelAdmin` views:
|
||||||
Sends a message to the user using the :mod:`django.contrib.messages`
|
Sends a message to the user using the :mod:`django.contrib.messages`
|
||||||
backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`.
|
backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`.
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
|
Keyword arguments were added in Django 1.5.
|
||||||
|
|
||||||
Keyword arguments allow you to change the message level, add extra CSS
|
Keyword arguments allow you to change the message level, add extra CSS
|
||||||
tags, or fail silently if the ``contrib.messages`` framework is not
|
tags, or fail silently if the ``contrib.messages`` framework is not
|
||||||
|
@ -1451,6 +1455,7 @@ in your own admin JavaScript without including a second copy, you can use the
|
||||||
``django.jQuery`` object on changelist and add/edit views.
|
``django.jQuery`` object on changelist and add/edit views.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The embedded jQuery has been upgraded from 1.4.2 to 1.9.1.
|
The embedded jQuery has been upgraded from 1.4.2 to 1.9.1.
|
||||||
|
|
||||||
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
||||||
|
|
|
@ -950,6 +950,7 @@ __ http://geohash.org/
|
||||||
*Availability*: PostGIS, SpatiaLite
|
*Availability*: PostGIS, SpatiaLite
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
``geojson`` support for Spatialite > 3.0 has been added.
|
``geojson`` support for Spatialite > 3.0 has been added.
|
||||||
|
|
||||||
Attaches a ``geojson`` attribute to every model in the queryset that contains the
|
Attaches a ``geojson`` attribute to every model in the queryset that contains the
|
||||||
|
|
|
@ -252,6 +252,7 @@ Enabling the sites framework
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
In previous versions, the sites framework was enabled by default.
|
In previous versions, the sites framework was enabled by default.
|
||||||
|
|
||||||
To enable the sites framework, follow these steps:
|
To enable the sites framework, follow these steps:
|
||||||
|
|
|
@ -182,6 +182,7 @@ Django supports MySQL 5.0.3 and higher.
|
||||||
data on all database schema. Django's ``inspectdb`` feature uses it.
|
data on all database schema. Django's ``inspectdb`` feature uses it.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The minimum version requirement of MySQL 5.0.3 was set in Django 1.5.
|
The minimum version requirement of MySQL 5.0.3 was set in Django 1.5.
|
||||||
|
|
||||||
Django expects the database to support Unicode (UTF-8 encoding) and delegates to
|
Django expects the database to support Unicode (UTF-8 encoding) and delegates to
|
||||||
|
|
|
@ -98,6 +98,7 @@ Can be run as a cronjob or directly to clean out old data from the database
|
||||||
(only expired sessions at the moment).
|
(only expired sessions at the moment).
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
:djadmin:`cleanup` is deprecated. Use :djadmin:`clearsessions` instead.
|
:djadmin:`cleanup` is deprecated. Use :djadmin:`clearsessions` instead.
|
||||||
|
|
||||||
compilemessages
|
compilemessages
|
||||||
|
@ -173,6 +174,7 @@ The :djadminopt:`--all` option may be provided to display all settings, even
|
||||||
if they have Django's default value. Such settings are prefixed by ``"###"``.
|
if they have Django's default value. Such settings are prefixed by ``"###"``.
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
The :djadminopt:`--all` option was added.
|
The :djadminopt:`--all` option was added.
|
||||||
|
|
||||||
dumpdata <appname appname appname.Model ...>
|
dumpdata <appname appname appname.Model ...>
|
||||||
|
@ -778,8 +780,6 @@ use the ``--plain`` option, like so::
|
||||||
|
|
||||||
django-admin.py shell --plain
|
django-admin.py shell --plain
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
|
||||||
|
|
||||||
If you would like to specify either IPython or bpython as your interpreter if
|
If you would like to specify either IPython or bpython as your interpreter if
|
||||||
you have both installed you can specify an alternative interpreter interface
|
you have both installed you can specify an alternative interpreter interface
|
||||||
with the ``-i`` or ``--interface`` options like so:
|
with the ``-i`` or ``--interface`` options like so:
|
||||||
|
@ -807,6 +807,10 @@ behavior you can use the ``--no-startup`` option. e.g.::
|
||||||
|
|
||||||
django-admin.py shell --plain --no-startup
|
django-admin.py shell --plain --no-startup
|
||||||
|
|
||||||
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
|
The ``--interface`` option was added in Django 1.5.
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
The ``--no-startup`` option was added in Django 1.6.
|
The ``--no-startup`` option was added in Django 1.6.
|
||||||
|
@ -1353,6 +1357,7 @@ for any other exception. If you specify ``--traceback``, ``django-admin.py``
|
||||||
will also output a full stack trace when a ``CommandError`` is raised.
|
will also output a full stack trace when a ``CommandError`` is raised.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Previously, Django didn't show a full stack trace by default for exceptions
|
Previously, Django didn't show a full stack trace by default for exceptions
|
||||||
other than ``CommandError``.
|
other than ``CommandError``.
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ the underlying database exceptions. See :pep:`249`, the Python Database API
|
||||||
Specification v2.0, for further information.
|
Specification v2.0, for further information.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Previous version of Django only wrapped ``DatabaseError`` and
|
Previous version of Django only wrapped ``DatabaseError`` and
|
||||||
``IntegrityError``.
|
``IntegrityError``.
|
||||||
|
|
||||||
|
|
|
@ -468,6 +468,7 @@ For each field, we describe the default widget used if you don't specify
|
||||||
``%(limit_value)s``, which will be substituted by the appropriate limit.
|
``%(limit_value)s``, which will be substituted by the appropriate limit.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Similarly, the ``max_digits``, ``max_decimal_places`` and
|
Similarly, the ``max_digits``, ``max_decimal_places`` and
|
||||||
``max_whole_digits`` error messages may contain ``%(max)s``.
|
``max_whole_digits`` error messages may contain ``%(max)s``.
|
||||||
|
|
||||||
|
@ -1014,10 +1015,12 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
|
||||||
``invalid_pk_value``
|
``invalid_pk_value``
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The empty and normalized values were changed to be consistently
|
The empty and normalized values were changed to be consistently
|
||||||
``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
|
``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The ``invalid_choice`` message may contain ``%(value)s`` and the
|
The ``invalid_choice`` message may contain ``%(value)s`` and the
|
||||||
``invalid_pk_value`` message may contain ``%(pk)s``, which will be
|
``invalid_pk_value`` message may contain ``%(pk)s``, which will be
|
||||||
substituted by the appropriate values.
|
substituted by the appropriate values.
|
||||||
|
|
|
@ -522,6 +522,7 @@ Selector and checkbox widgets
|
||||||
``True`` if the checkbox should be checked for that value.
|
``True`` if the checkbox should be checked for that value.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
Exceptions from ``check_test`` used to be silenced by its caller,
|
Exceptions from ``check_test`` used to be silenced by its caller,
|
||||||
this is no longer the case, they will propagate upwards.
|
this is no longer the case, they will propagate upwards.
|
||||||
|
|
||||||
|
|
|
@ -206,6 +206,7 @@ Transaction middleware
|
||||||
.. class:: TransactionMiddleware
|
.. class:: TransactionMiddleware
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
``TransactionMiddleware`` is deprecated. The documentation of transactions
|
``TransactionMiddleware`` is deprecated. The documentation of transactions
|
||||||
contains :ref:`upgrade instructions <transactions-upgrading-from-1.5>`.
|
contains :ref:`upgrade instructions <transactions-upgrading-from-1.5>`.
|
||||||
|
|
||||||
|
|
|
@ -378,6 +378,7 @@ If you need to accept :attr:`~Field.null` values then use
|
||||||
:class:`NullBooleanField` instead.
|
:class:`NullBooleanField` instead.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The default value of ``BooleanField`` was changed from ``False`` to
|
The default value of ``BooleanField`` was changed from ``False`` to
|
||||||
``None`` when :attr:`Field.default` isn't defined.
|
``None`` when :attr:`Field.default` isn't defined.
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,7 @@ follows this algorithm:
|
||||||
didn't update anything, Django executes an ``INSERT``.
|
didn't update anything, Django executes an ``INSERT``.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
|
Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
|
||||||
algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
|
algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
|
||||||
|
|
||||||
|
|
|
@ -554,11 +554,13 @@ Returns a ``DateQuerySet`` — a ``QuerySet`` that evaluates to a list of
|
||||||
particular kind within the contents of the ``QuerySet``.
|
particular kind within the contents of the ``QuerySet``.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
``dates`` used to return a list of :class:`datetime.datetime` objects.
|
``dates`` used to return a list of :class:`datetime.datetime` objects.
|
||||||
|
|
||||||
``field`` should be the name of a ``DateField`` of your model.
|
``field`` should be the name of a ``DateField`` of your model.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
``dates`` used to accept operating on a ``DateTimeField``.
|
``dates`` used to accept operating on a ``DateTimeField``.
|
||||||
|
|
||||||
``kind`` should be either ``"year"``, ``"month"`` or ``"day"``. Each
|
``kind`` should be either ``"year"``, ``"month"`` or ``"day"``. Each
|
||||||
|
@ -1193,15 +1195,15 @@ logically::
|
||||||
# existing set of fields).
|
# existing set of fields).
|
||||||
Entry.objects.defer("body").only("headline", "body")
|
Entry.objects.defer("body").only("headline", "body")
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
|
||||||
|
|
||||||
All of the cautions in the note for the :meth:`defer` documentation apply to
|
All of the cautions in the note for the :meth:`defer` documentation apply to
|
||||||
``only()`` as well. Use it cautiously and only after exhausting your other
|
``only()`` as well. Use it cautiously and only after exhausting your other
|
||||||
options. Also note that using :meth:`only` and omitting a field requested
|
options.
|
||||||
using :meth:`select_related` is an error as well.
|
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
|
Using :meth:`only` and omitting a field requested using
|
||||||
|
:meth:`select_related` is an error as well.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
When calling :meth:`~django.db.models.Model.save()` for instances with
|
When calling :meth:`~django.db.models.Model.save()` for instances with
|
||||||
|
@ -1424,6 +1426,7 @@ query. The default is to create all objects in one batch, except for SQLite
|
||||||
where the default is such that at maximum 999 variables per query is used.
|
where the default is such that at maximum 999 variables per query is used.
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
The ``batch_size`` parameter was added in version 1.5.
|
The ``batch_size`` parameter was added in version 1.5.
|
||||||
|
|
||||||
count
|
count
|
||||||
|
@ -1725,7 +1728,8 @@ methods on your models. It does, however, emit the
|
||||||
(including cascaded deletions).
|
(including cascaded deletions).
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
Allow fast-path deletion of objects
|
|
||||||
|
Allow fast-path deletion of objects.
|
||||||
|
|
||||||
Django needs to fetch objects into memory to send signals and handle cascades.
|
Django needs to fetch objects into memory to send signals and handle cascades.
|
||||||
However, if there are no cascades and no signals, then Django may take a
|
However, if there are no cascades and no signals, then Django may take a
|
||||||
|
|
|
@ -94,6 +94,7 @@ All attributes should be considered read-only, unless stated otherwise below.
|
||||||
:attr:`HttpRequest.body` attribute instead.
|
:attr:`HttpRequest.body` attribute instead.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
Before Django 1.5, HttpRequest.POST contained non-form data.
|
Before Django 1.5, HttpRequest.POST contained non-form data.
|
||||||
|
|
||||||
It's possible that a request can come in via POST with an empty ``POST``
|
It's possible that a request can come in via POST with an empty ``POST``
|
||||||
|
|
|
@ -1486,6 +1486,7 @@ randomly-generated ``SECRET_KEY`` to each new project.
|
||||||
execution vulnerabilities.
|
execution vulnerabilities.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
Django will now refuse to start if :setting:`SECRET_KEY` is not set.
|
Django will now refuse to start if :setting:`SECRET_KEY` is not set.
|
||||||
|
|
||||||
.. setting:: SECURE_PROXY_SSL_HEADER
|
.. setting:: SECURE_PROXY_SSL_HEADER
|
||||||
|
|
|
@ -272,6 +272,7 @@ Every context contains ``True``, ``False`` and ``None``. As you would expect,
|
||||||
these variables resolve to the corresponding Python objects.
|
these variables resolve to the corresponding Python objects.
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
Before Django 1.5, these variables weren't a special case, and they
|
Before Django 1.5, these variables weren't a special case, and they
|
||||||
resolved to ``None`` unless you defined them in the context.
|
resolved to ``None`` unless you defined them in the context.
|
||||||
|
|
||||||
|
|
|
@ -1065,6 +1065,7 @@ by the context as to the current application.
|
||||||
Don't forget to put quotes around the function path or pattern name!
|
Don't forget to put quotes around the function path or pattern name!
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The first parameter used not to be quoted, which was inconsistent with
|
The first parameter used not to be quoted, which was inconsistent with
|
||||||
other template tags. Since Django 1.5, it is evaluated according to
|
other template tags. Since Django 1.5, it is evaluated according to
|
||||||
the usual rules: it can be a quoted string or a variable that will be
|
the usual rules: it can be a quoted string or a variable that will be
|
||||||
|
|
|
@ -66,6 +66,7 @@ We can't possibly document everything that's new in 1.0, but the documentation
|
||||||
will be your definitive guide. Anywhere you see something like:
|
will be your definitive guide. Anywhere you see something like:
|
||||||
|
|
||||||
.. versionadded:: 1.0
|
.. versionadded:: 1.0
|
||||||
|
|
||||||
This feature is new in Django 1.0
|
This feature is new in Django 1.0
|
||||||
|
|
||||||
You'll know that you're looking at something new or changed.
|
You'll know that you're looking at something new or changed.
|
||||||
|
|
|
@ -759,6 +759,7 @@ patterns.
|
||||||
mail will be sent either.
|
mail will be sent either.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Previously, error messages indicated whether a given email was
|
Previously, error messages indicated whether a given email was
|
||||||
registered.
|
registered.
|
||||||
|
|
||||||
|
@ -1041,6 +1042,7 @@ Thus, you can check permissions in template ``{% if %}`` statements:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
Permission lookup by "if in".
|
Permission lookup by "if in".
|
||||||
|
|
||||||
It is possible to also look permissions up by ``{% if in %}`` statements.
|
It is possible to also look permissions up by ``{% if in %}`` statements.
|
||||||
|
|
|
@ -176,6 +176,7 @@ your choice of default manager in order to avoid a situation where overriding
|
||||||
work with.
|
work with.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The ``get_queryset`` method was previously named ``get_query_set``.
|
The ``get_queryset`` method was previously named ``get_query_set``.
|
||||||
|
|
||||||
.. _managers-for-related-objects:
|
.. _managers-for-related-objects:
|
||||||
|
|
|
@ -681,6 +681,7 @@ In addition, some objects are automatically created just after
|
||||||
database).
|
database).
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
Previously, ``ContentType`` and ``Permission`` instances were created only
|
Previously, ``ContentType`` and ``Permission`` instances were created only
|
||||||
in the default database.
|
in the default database.
|
||||||
|
|
||||||
|
|
|
@ -638,6 +638,7 @@ that were modified more than 3 days after they were published::
|
||||||
>>> Entry.objects.filter(mod_date__gt=F('pub_date') + timedelta(days=3))
|
>>> Entry.objects.filter(mod_date__gt=F('pub_date') + timedelta(days=3))
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
``.bitand()`` and ``.bitor()``
|
``.bitand()`` and ``.bitor()``
|
||||||
|
|
||||||
The ``F()`` objects now support bitwise operations by ``.bitand()`` and
|
The ``F()`` objects now support bitwise operations by ``.bitand()`` and
|
||||||
|
@ -646,6 +647,7 @@ The ``F()`` objects now support bitwise operations by ``.bitand()`` and
|
||||||
>>> F('somefield').bitand(16)
|
>>> F('somefield').bitand(16)
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The previously undocumented operators ``&`` and ``|`` no longer produce
|
The previously undocumented operators ``&`` and ``|`` no longer produce
|
||||||
bitwise operations, use ``.bitand()`` and ``.bitor()`` instead.
|
bitwise operations, use ``.bitand()`` and ``.bitor()`` instead.
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,7 @@ For example::
|
||||||
return row
|
return row
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
In Django 1.5 and earlier, after performing a data changing operation, you
|
In Django 1.5 and earlier, after performing a data changing operation, you
|
||||||
had to call ``transaction.commit_unless_managed()`` to ensure your changes
|
had to call ``transaction.commit_unless_managed()`` to ensure your changes
|
||||||
were committed to the database. Since Django now defaults to database-level
|
were committed to the database. Since Django now defaults to database-level
|
||||||
|
|
|
@ -22,6 +22,7 @@ integrity of ORM operations that require multiple queries, especially
|
||||||
<topics-db-queries-update>` queries.
|
<topics-db-queries-update>` queries.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Previous version of Django featured :ref:`a more complicated default
|
Previous version of Django featured :ref:`a more complicated default
|
||||||
behavior <transactions-upgrading-from-1.5>`.
|
behavior <transactions-upgrading-from-1.5>`.
|
||||||
|
|
||||||
|
@ -78,6 +79,7 @@ Middleware run outside of the transaction, and so does the rendering of
|
||||||
template responses.
|
template responses.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Django used to provide this feature via ``TransactionMiddleware``, which is
|
Django used to provide this feature via ``TransactionMiddleware``, which is
|
||||||
now deprecated.
|
now deprecated.
|
||||||
|
|
||||||
|
@ -204,6 +206,7 @@ To avoid this, you can :ref:`deactivate the transaction management
|
||||||
<deactivate-transaction-management>`, but it isn't recommended.
|
<deactivate-transaction-management>`, but it isn't recommended.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
Before Django 1.6, autocommit was turned off, and it was emulated by
|
Before Django 1.6, autocommit was turned off, and it was emulated by
|
||||||
forcing a commit after write operations in the ORM.
|
forcing a commit after write operations in the ORM.
|
||||||
|
|
||||||
|
@ -224,6 +227,7 @@ where you want to run your own transaction-controlling middleware or do
|
||||||
something really strange.
|
something really strange.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
This used to be controlled by the ``TRANSACTIONS_MANAGED`` setting.
|
This used to be controlled by the ``TRANSACTIONS_MANAGED`` setting.
|
||||||
|
|
||||||
Low-level APIs
|
Low-level APIs
|
||||||
|
|
|
@ -111,6 +111,7 @@ affect validation. If ``validate_max=True`` is passed to the
|
||||||
validation. See :ref:`validate_max`.
|
validation. See :ref:`validate_max`.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The ``validate_max`` parameter was added to
|
The ``validate_max`` parameter was added to
|
||||||
:func:`~django.forms.formsets.formset_factory`. Also, the behavior of
|
:func:`~django.forms.formsets.formset_factory`. Also, the behavior of
|
||||||
``FormSet`` was brought in line with that of ``ModelFormSet`` so that it
|
``FormSet`` was brought in line with that of ``ModelFormSet`` so that it
|
||||||
|
@ -310,6 +311,7 @@ should use custom formset validation.
|
||||||
using forged POST requests.
|
using forged POST requests.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The ``validate_max`` parameter was added to
|
The ``validate_max`` parameter was added to
|
||||||
:func:`~django.forms.formsets.formset_factory`.
|
:func:`~django.forms.formsets.formset_factory`.
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,7 @@ Dealing with streaming responses
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
``response`` may also be an :class:`~django.http.StreamingHttpResponse`
|
``response`` may also be an :class:`~django.http.StreamingHttpResponse`
|
||||||
object.
|
object.
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ default cache. To use another cache, set :setting:`SESSION_CACHE_ALIAS` to the
|
||||||
name of that cache.
|
name of that cache.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The :setting:`SESSION_CACHE_ALIAS` setting was added.
|
The :setting:`SESSION_CACHE_ALIAS` setting was added.
|
||||||
|
|
||||||
Once your cache is configured, you've got two choices for how to store data in
|
Once your cache is configured, you've got two choices for how to store data in
|
||||||
|
@ -451,6 +452,7 @@ Similarly, the ``expires`` part of a session cookie is updated each time the
|
||||||
session cookie is sent.
|
session cookie is sent.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. 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:
|
.. _browser-length-vs-persistent-sessions:
|
||||||
|
|
|
@ -51,6 +51,7 @@ Optional arguments
|
||||||
the :setting:`DEFAULT_CONTENT_TYPE` setting.
|
the :setting:`DEFAULT_CONTENT_TYPE` setting.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
This parameter used to be called ``mimetype``.
|
This parameter used to be called ``mimetype``.
|
||||||
|
|
||||||
``status``
|
``status``
|
||||||
|
@ -129,6 +130,7 @@ Optional arguments
|
||||||
the :setting:`DEFAULT_CONTENT_TYPE` setting.
|
the :setting:`DEFAULT_CONTENT_TYPE` setting.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
This parameter used to be called ``mimetype``.
|
This parameter used to be called ``mimetype``.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1529,6 +1529,7 @@ selection based on data from the request. It customizes content for each user.
|
||||||
``'django.middleware.locale.LocaleMiddleware'``.
|
``'django.middleware.locale.LocaleMiddleware'``.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
In previous versions, ``LocaleMiddleware`` wasn't enabled by default.
|
In previous versions, ``LocaleMiddleware`` wasn't enabled by default.
|
||||||
|
|
||||||
Because middleware order matters, you should follow these guidelines:
|
Because middleware order matters, you should follow these guidelines:
|
||||||
|
|
|
@ -235,6 +235,7 @@ the Django test runner reorders tests in the following way:
|
||||||
restoring it to its original state are run.
|
restoring it to its original state are run.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
Before Django 1.5, the only guarantee was that
|
Before Django 1.5, the only guarantee was that
|
||||||
:class:`~django.test.TestCase` tests were always ran first, before any other
|
:class:`~django.test.TestCase` tests were always ran first, before any other
|
||||||
tests.
|
tests.
|
||||||
|
@ -612,6 +613,7 @@ Use the ``django.test.client.Client`` class to make requests.
|
||||||
a ``Content-Type`` header is set to ``content_type``.
|
a ``Content-Type`` header is set to ``content_type``.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
:meth:`Client.options` used to process ``data`` like
|
:meth:`Client.options` used to process ``data`` like
|
||||||
:meth:`Client.get`.
|
:meth:`Client.get`.
|
||||||
|
|
||||||
|
@ -627,6 +629,7 @@ Use the ``django.test.client.Client`` class to make requests.
|
||||||
a ``Content-Type`` header is set to ``content_type``.
|
a ``Content-Type`` header is set to ``content_type``.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
:meth:`Client.put` used to process ``data`` like
|
:meth:`Client.put` used to process ``data`` like
|
||||||
:meth:`Client.post`.
|
:meth:`Client.post`.
|
||||||
|
|
||||||
|
@ -650,6 +653,7 @@ Use the ``django.test.client.Client`` class to make requests.
|
||||||
a ``Content-Type`` header is set to ``content_type``.
|
a ``Content-Type`` header is set to ``content_type``.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
:meth:`Client.delete` used to process ``data`` like
|
:meth:`Client.delete` used to process ``data`` like
|
||||||
:meth:`Client.get`.
|
:meth:`Client.get`.
|
||||||
|
|
||||||
|
@ -940,6 +944,7 @@ to test the effects of commit and rollback:
|
||||||
the test has been properly updated.
|
the test has been properly updated.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The order in which tests are run has changed. See `Order in which tests are
|
The order in which tests are run has changed. See `Order in which tests are
|
||||||
executed`_.
|
executed`_.
|
||||||
|
|
||||||
|
@ -990,6 +995,7 @@ additions, including:
|
||||||
errors.
|
errors.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
|
|
||||||
The order in which tests are run has changed. See `Order in which tests are
|
The order in which tests are run has changed. See `Order in which tests are
|
||||||
executed`_.
|
executed`_.
|
||||||
|
|
||||||
|
@ -1581,6 +1587,7 @@ your test suite.
|
||||||
``False``, which turns the comparison into a Python set comparison.
|
``False``, which turns the comparison into a Python set comparison.
|
||||||
|
|
||||||
.. versionchanged:: 1.6
|
.. versionchanged:: 1.6
|
||||||
|
|
||||||
The method now checks for undefined order and raises ``ValueError``
|
The method now checks for undefined order and raises ``ValueError``
|
||||||
if undefined order is spotted. The ordering is seen as undefined if
|
if undefined order is spotted. The ordering is seen as undefined if
|
||||||
the given ``qs`` isn't ordered and the comparison is against more
|
the given ``qs`` isn't ordered and the comparison is against more
|
||||||
|
|
Loading…
Reference in New Issue