Removed versionadded/changed annotations for 1.11.

This commit is contained in:
Tim Graham 2017-09-02 21:49:07 -04:00
parent 2bd207ada0
commit 5446b72003
53 changed files with 0 additions and 489 deletions

View File

@ -240,10 +240,6 @@ Methods
``require_ready`` argument is set to ``False``. ``require_ready`` behaves
exactly as in :meth:`apps.get_model()`.
.. versionadded:: 1.11
The ``require_ready`` keyword argument was added.
.. method:: AppConfig.ready()
Subclasses can override this method to perform initialization tasks such
@ -373,10 +369,6 @@ Application registry
best to leave ``require_ready`` to the default value of ``True`` whenever
possible.
.. versionadded:: 1.11
The ``require_ready`` keyword argument was added.
.. _app-loading-process:
Initialization process

View File

@ -220,10 +220,6 @@ subclass::
e.g. if all the dates are in one month, it'll show the day-level
drill-down only.
.. versionchanged:: 1.11
The ability to reference fields on related models was added.
.. note::
``date_hierarchy`` uses :meth:`QuerySet.datetimes()
@ -1364,8 +1360,6 @@ templates used by the :class:`ModelAdmin` views:
.. attribute:: ModelAdmin.popup_response_template
.. versionadded:: 1.11
Path to a custom template, used by :meth:`response_add`,
:meth:`response_change`, and :meth:`response_delete`.
@ -1525,8 +1519,6 @@ templates used by the :class:`ModelAdmin` views:
.. method:: ModelAdmin.get_exclude(request, obj=None)
.. versionadded:: 1.11
The ``get_exclude`` method is given the ``HttpRequest`` and the ``obj``
being edited (or ``None`` on an add form) and is expected to return a list
of fields, as described in :attr:`ModelAdmin.exclude`.
@ -2600,10 +2592,6 @@ app or per model. The following can:
* ``object_history.html``
* ``popup_response.html``
.. versionchanged:: 1.11
The ability to override the ``popup_response.html`` template was added.
For those templates that cannot be overridden in this way, you may still
override them for your entire project. Just place the new version in your
``templates/admin`` directory. This is particularly useful to create custom 404

View File

@ -460,10 +460,6 @@ can be used for notification when a user logs in or out.
The :class:`~django.http.HttpRequest` object, if one was provided to
:func:`~django.contrib.auth.authenticate`.
.. versionchanged:: 1.11
The ``request`` argument was added.
.. _authentication-backends-reference:
Authentication backends
@ -517,10 +513,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
(which passes it on to the backend).
.. versionchanged:: 1.11
The ``request`` argument was added.
.. method:: get_user_permissions(user_obj, obj=None)
Returns the set of permission strings the ``user_obj`` has from their

View File

@ -44,11 +44,6 @@ GeoDjango's admin site
Link to the URL of the OpenLayers JavaScript. Defaults to
``'https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js'``.
.. versionchanged:: 1.11
Older versions default to
``'http://openlayers.org/api/2.13.1/OpenLayers.js'``.
.. attribute:: modifiable
Defaults to ``True``. When set to ``False``, disables editing of

View File

@ -158,14 +158,6 @@ Widget classes
``OpenLayers.js`` file `tailored to your needs`_ in the ``js`` property of
the inner ``Media`` class (see :ref:`assets-as-a-static-definition`).
.. versionchanged:: 1.11
Older versions use ``OpenLayers.js`` from ``openlayers.org`` which
isn't suitable for production use since it offers no guaranteed uptime
and runs on a slow server.
Also, the widget nows uses OpenLayers 3 instead of OpenLayers 2.
.. _tailored to your needs: http://openlayers.org/en/latest/doc/tutorials/custom-builds.html
``OSMWidget``
@ -195,10 +187,4 @@ Widget classes
applies here. See also this `FAQ answer`_ about ``https`` access to map
tiles.
.. versionchanged:: 1.11
OpenLayers 2.x has been dropped in favor of OpenLayers 3. If you extend
the ``gis/openlayers-osm.html`` template, please review your custom
template.
.. _FAQ answer: https://help.openstreetmap.org/questions/10920/how-to-embed-a-map-in-my-https-site

View File

@ -46,11 +46,6 @@ field as an :class:`~django.contrib.gis.measure.Area` measure.
MySQL and SpatiaLite without LWGEOM don't support area calculations on
geographic SRSes.
.. versionchanged:: 1.11
In older versions, a raw value was returned on MySQL when used on
projected SRS.
``AsGeoJSON``
=============
@ -118,10 +113,6 @@ Keyword Argument Description
__ https://en.wikipedia.org/wiki/Geography_Markup_Language
.. versionchanged:: 1.11
Oracle support was added.
``AsKML``
=========
@ -201,10 +192,6 @@ polygon that can fully contain the geometry.
The ``num_seg`` parameter is used only on PostGIS.
.. versionchanged:: 1.11
Oracle support was added.
``Centroid``
============
@ -273,11 +260,6 @@ queryset is calculated::
in kilometers. See :doc:`measure` for usage details and the list of
:ref:`supported_units`.
.. versionchanged:: 1.11
In older versions, a raw value was returned on MySQL when used on
projected SRS.
``Envelope``
============
@ -342,10 +324,6 @@ intersection between them.
Accepts a geographic field or expression and tests if the value is well formed.
Returns ``True`` if its value is a valid geometry and ``False`` otherwise.
.. versionchanged:: 1.11
SpatiaLite and Oracle support was added.
.. versionchanged:: 2.0
MySQL support was added.
@ -369,10 +347,6 @@ resource-intensive) with the ``spheroid`` keyword argument.
MySQL doesn't support length calculations on geographic SRSes.
.. versionchanged:: 1.11
In older versions, a raw value was returned on MySQL.
``LineLocatePoint``
===================
@ -399,10 +373,6 @@ a valid geometry without losing any of the input vertices. Geometries that are
already valid are returned without changes. Simple polygons might become a
multipolygon and the result might be of lower dimension than the input.
.. versionchanged:: 1.11
SpatiaLite support was added.
``MemSize``
===========
@ -440,10 +410,6 @@ in a geometry.
On MySQL, returns ``None`` for any non-``LINESTRING`` geometry.
.. versionchanged:: 1.11
SpatiaLite support for non-``LINESTRING`` geometries was added.
``Perimeter``
=============

View File

@ -450,8 +450,6 @@ coordinate transformation::
.. classmethod:: from_gml(gml_string)
.. versionadded:: 1.11
Constructs an :class:`OGRGeometry` from the given GML string.
.. classmethod:: from_bbox(bbox)
@ -1162,15 +1160,6 @@ blue.
>>> rst.name # Stored in a random path in the vsimem filesystem.
'/vsimem/da300bdb-129d-49a8-b336-e410a9428dad'
.. versionchanged:: 1.11
Added the ability to pass the ``size``, ``shape``, and ``offset``
parameters when creating :class:`GDALRaster` objects. The parameters
can be passed through the ``ds_input`` dictionary. This allows to
finely control initial pixel values. The functionality is similar to
the :meth:`GDALBand.data()<django.contrib.gis.gdal.GDALBand.data>`
method.
.. versionchanged:: 2.0
Added the ability to read and write rasters in GDAL's memory-based

View File

@ -322,10 +322,6 @@ MySQL, PostGIS, SpatiaLite ``ST_IsValid(poly)``
Oracle ``SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(poly, 0.05) = 'TRUE'``
========================== ================================================================
.. versionchanged:: 1.11
Oracle and SpatiaLite support was added.
.. versionchanged:: 2.0
MySQL support was added.
@ -635,10 +631,6 @@ simpler `ST_Distance <https://postgis.net/docs/ST_Distance.html>`__ function is
used with projected coordinate systems. Rasters are converted to geometries for
spheroid based lookups.
.. versionadded:: 1.11
Support for the ``'spheroid'`` option on SQLite was added.
.. versionadded:: 2.0
MySQL support was added.
@ -746,10 +738,6 @@ Oracle ``SDO_WITHIN_DISTANCE(poly, geom, 5)``
SpatiaLite ``PtDistWithin(poly, geom, 5)``
========== ======================================
.. versionchanged:: 1.11
SpatiaLite support was added.
Aggregate Functions
-------------------

View File

@ -173,11 +173,6 @@ Geometries support set-like operators::
>>> ls3 == ls2 # different SRIDs
False
.. versionchanged:: 1.11
Older versions didn't check the ``srid`` when comparing
``GEOSGeometry`` objects using the equality operator.
Geometry Objects
================
@ -238,8 +233,6 @@ isn't provided, the SRID defaults to 4326.
.. classmethod:: GEOSGeometry.from_gml(gml_string)
.. versionadded:: 1.11
Constructs a :class:`GEOSGeometry` from the given GML string.
Properties

View File

@ -19,11 +19,6 @@ Program Description Required
Note that older or more recent versions of these libraries *may* also work
totally fine with GeoDjango. Your mileage may vary.
.. versionchanged:: 1.11
In older versions, GDAL is required only for SQLite. Now it's required for
all databases.
..
Libs release dates:
GEOS 3.4.0 2013-08-11

View File

@ -70,8 +70,6 @@ General-purpose aggregation functions
.. class:: JSONBAgg(expressions, filter=None, **extra)
.. versionadded:: 1.11
Returns the input values as a ``JSON`` array. Requires PostgreSQL ≥ 9.5.
``StringAgg``
@ -88,8 +86,6 @@ General-purpose aggregation functions
.. attribute:: distinct
.. versionadded:: 1.11
An optional boolean argument that determines if concatenated values
will be distinct. Defaults to ``False``.

View File

@ -255,8 +255,6 @@ A more useful index is a ``GIN`` index, which you should create using a
.. class:: CIText(**options)
.. versionadded:: 1.11
A mixin to create case-insensitive text fields backed by the citext_ type.
Read about `the performance considerations`_ prior to using it.
@ -298,10 +296,6 @@ A more useful index is a ``GIN`` index, which you should create using a
You'll see an error like ``can't adapt type 'dict'`` if you skip the first
step, or ``type "hstore" does not exist`` if you skip the second.
.. versionchanged:: 1.11
Added the ability to store nulls. Previously, they were cast to strings.
.. note::
On occasions it may be useful to require or restrict the keys which are
@ -482,8 +476,6 @@ using in conjunction with lookups on
.. attribute:: encoder
.. versionadded:: 1.11
An optional JSON-encoding class to serialize data types not supported
by the standard JSON serializer (``datetime``, ``uuid``, etc.). For
example, you can use the

View File

@ -159,10 +159,6 @@ Fields
valid for a given field. This can be done using the
:class:`~django.contrib.postgres.validators.KeysValidator`.
.. versionchanged:: 1.11
Added the ability to store nulls.
``JSONField``
-------------

View File

@ -4,8 +4,6 @@ PostgreSQL specific model indexes
.. module:: django.contrib.postgres.indexes
.. versionadded:: 1.11
The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
available from the ``django.contrib.postgres.indexes`` module.

View File

@ -54,8 +54,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
.. class:: BtreeGinExtension()
.. versionadded:: 1.11
Install the ``btree_gin`` extension.
``BtreeGistExtension``
@ -72,8 +70,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
.. class:: CITextExtension()
.. versionadded:: 1.11
Installs the ``citext`` extension.
``CryptoExtension``

View File

@ -305,12 +305,6 @@ passes might be needed. Increase the maximum number of passes by subclassing
``ManifestStaticFilesStorage`` and setting the ``max_post_process_passes``
attribute. It defaults to 5.
.. versionchanged:: 1.11
Previous versions didn't make multiple passes to ensure file hashes
converged, so often times file hashes weren't correct. The
``max_post_process_passes`` attribute was added.
To enable the ``ManifestStaticFilesStorage`` you have to make sure the
following requirements are met:
@ -333,11 +327,6 @@ If a file isn't found in the ``staticfiles.json`` manifest at runtime, a
``ManifestStaticFilesStorage`` and setting the ``manifest_strict`` attribute to
``False`` -- nonexistent paths will remain unchanged.
.. versionchanged:: 1.11
The ``manifest_strict`` attribute was added. In older versions, the
behavior is the same as ``manifest_strict=False``.
Due to the requirement of running :djadmin:`collectstatic`, this storage
typically shouldn't be used when running tests as ``collectstatic`` isn't run
as part of the normal test setup. During testing, ensure that the

View File

@ -232,11 +232,6 @@ own view for handling this condition. To do this, simply set the
CSRF failures are logged as warnings to the :ref:`django.security.csrf
<django-security-logger>` logger.
.. versionchanged:: 1.11
In older versions, CSRF failures are logged to the ``django.request``
logger.
.. _how-csrf-works:
How it works

View File

@ -176,8 +176,6 @@ using a migration, use the
Server-side cursors
-------------------
.. versionadded:: 1.11
When using :meth:`QuerySet.iterator()
<django.db.models.query.QuerySet.iterator>`, Django opens a :ref:`server-side
cursor <psycopg2:server-side-cursors>`. By default, PostgreSQL assumes that
@ -194,8 +192,6 @@ cursor query is controlled with the `cursor_tuple_fraction`_ option.
Transaction pooling and server-side cursors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 1.11.1
Using a connection pooler in transaction pooling mode (e.g. `pgBouncer`_)
requires disabling server-side cursors for that connection.
@ -254,8 +250,6 @@ management command generates the SQL statements to do that.
Test database templates
-----------------------
.. versionadded:: 1.11
You can use the :setting:`TEST['TEMPLATE'] <TEST_TEMPLATE>` setting to specify
a `template`_ (e.g. ``'template0'``) from which to create a test database.
@ -495,8 +489,6 @@ like other MySQL options: either in a config file or with the entry
Isolation level
~~~~~~~~~~~~~~~
.. versionadded:: 1.11
When running concurrent loads, database transactions from different sessions
(say, separate threads handling different requests) may interact with each
other. These interactions are affected by each session's `transaction isolation

View File

@ -235,8 +235,6 @@ are prefixed by ``"###"``.
.. django-admin-option:: --default MODULE
.. versionadded:: 1.11
The settings module to compare the current settings against. Leave empty to
compare against Django's default settings.
@ -438,8 +436,6 @@ Specifies the :ref:`serialization format <serialization-formats>` (e.g.,
.. django-admin-option:: --exclude EXCLUDE, -e EXCLUDE
.. versionadded:: 1.11
Excludes loading the fixtures from the given applications and/or models (in the
form of ``app_label`` or ``app_label.ModelName``). Use the option multiple
times to exclude more than one app or model.
@ -1019,10 +1015,6 @@ You can also pass code in on standard input to execute it. For example:
On Windows, the REPL is output due to implementation limits of
:func:`select.select` on that platform.
.. versionchanged:: 1.11
In older versions, the REPL is also output on UNIX systems.
``showmigrations``
------------------
@ -1050,10 +1042,6 @@ of 2 and above, all dependencies of a migration will also be shown.
``app_label``\s arguments limit the output, however, dependencies of provided
apps may also be included.
.. versionchanged:: 1.11
In older versions, ``showmigrations --plan`` ignores app labels.
.. django-admin-option:: --database DATABASE
Specifies the database to examine. Defaults to ``default``.
@ -1325,8 +1313,6 @@ class <order-of-tests>` is preserved when using this option.
.. django-admin-option:: --debug-mode
.. versionadded:: 1.11
Sets the :setting:`DEBUG` setting to ``True`` prior to running tests. This may
help troubleshoot test failures.
@ -1529,8 +1515,6 @@ instance.
.. django-admin:: remove_stale_contenttypes
.. versionadded:: 1.11
This command is only available if Django's :doc:`contenttypes app
</ref/contrib/contenttypes>` (:mod:`django.contrib.contenttypes`) is installed.

View File

@ -42,10 +42,6 @@ Django core exception classes are defined in ``django.core.exceptions``.
return any results. Most Django projects won't encounter this exception,
but it might be useful for implementing custom lookups and expressions.
.. versionchanged:: 1.11
In older versions, it's only importable from ``django.db.models.sql``.
``FieldDoesNotExist``
---------------------

View File

@ -90,10 +90,6 @@ The ``File`` class
``truncate``, ``write``, ``writelines``, ``readable()``, ``writable()``,
and ``seekable()``.
.. versionchanged:: 1.11
The ``readable()`` and ``writable()`` methods were added.
.. currentmodule:: django.core.files.base
The ``ContentFile`` class

View File

@ -261,8 +261,6 @@ precedence::
.. method:: Form.get_initial_for_field(field, field_name)
.. versionadded:: 1.11
Use :meth:`~Form.get_initial_for_field()` to retrieve initial data for a form
field. It retrieves data from :attr:`Form.initial` and :attr:`Field.initial`,
in that order, and evaluates any callable initial values.
@ -462,11 +460,6 @@ include ``checked`` if appropriate::
<tr><th><label for="id_sender">Sender:</label></th><td><input type="email" name="sender" id="id_sender" value="foo@example.com" required /></td></tr>
<tr><th><label for="id_cc_myself">Cc myself:</label></th><td><input type="checkbox" name="cc_myself" id="id_cc_myself" checked /></td></tr>
.. versionchanged:: 1.11
The ``checked`` attribute was changed to use HTML5 boolean syntax rather
than ``checked="checked"``.
This default output is a two-column HTML table, with a ``<tr>`` for each field.
Notice the following:
@ -734,8 +727,6 @@ Configuring the rendering of a form's widgets
.. attribute:: Form.default_renderer
.. versionadded:: 1.11
Specifies the :doc:`renderer <renderers>` to use for the form. Defaults to
``None`` which means to use the default renderer specified by the
:setting:`FORM_RENDERER` setting.

View File

@ -386,8 +386,6 @@ For each field, we describe the default widget used if you don't specify
.. attribute:: empty_value
.. versionadded:: 1.11
The value to use to represent "empty". Defaults to an empty string.
``ChoiceField``

View File

@ -5,11 +5,6 @@ The form rendering API
.. module:: django.forms.renderers
:synopsis: Built-in form renderers.
.. versionadded:: 1.11
In older versions, widgets are rendered using Python. All APIs described
in this document are new.
Django's form widgets are rendered using Django's :doc:`template engines
system </topics/templates>`.

View File

@ -238,8 +238,6 @@ foundation for custom widgets.
.. method:: get_context(name, value, attrs)
.. versionadded:: 1.11
Returns a dictionary of values to use when rendering the widget
template. By default, the dictionary contains a single key,
``'widget'``, which is a dictionary representation of the widget

View File

@ -63,10 +63,6 @@ Adds a few conveniences for perfectionists:
* Sets the ``Content-Length`` header for non-streaming responses.
.. versionchanged:: 1.11
Older versions didn't set the ``Content-Length`` header.
.. attribute:: CommonMiddleware.response_redirect_class
Defaults to :class:`~django.http.HttpResponsePermanentRedirect`. Subclass
@ -162,11 +158,6 @@ header, the middleware adds one if needed. If the response has a ``ETag`` or
``If-Modified-Since``, the response is replaced by an
:class:`~django.http.HttpResponseNotModified`.
.. versionchanged:: 1.11
In older versions, the middleware set the ``Content-Length`` and ``Date``
headers and didn't set the ``ETag`` header.
Locale middleware
-----------------

View File

@ -197,8 +197,6 @@ is set, its column name).
.. class:: AddIndex(model_name, index)
.. versionadded:: 1.11
Creates an index in the database table for the model with ``model_name``.
``index`` is an instance of the :class:`~django.db.models.Index` class.
@ -207,8 +205,6 @@ Creates an index in the database table for the model with ``model_name``.
.. class:: RemoveIndex(model_name, name)
.. versionadded:: 1.11
Removes the index named ``name`` from the model with ``model_name``.
Special Operations
@ -477,10 +473,6 @@ Some things to note:
from_state.clear_delayed_apps_cache()
...
.. versionadded:: 1.11
This requirement and the ``clear_delayed_apps_cache()`` method is new.
* ``to_state`` in the database_backwards method is the *older* state; that is,
the one that will be the current state once the migration has finished reversing.

View File

@ -433,8 +433,6 @@ Usage example::
.. class:: ExtractWeek(expression, tzinfo=None, **extra)
.. versionadded:: 1.11
.. attribute:: lookup_name = 'week'
.. class:: ExtractQuarter(expression, tzinfo=None, **extra)
@ -698,8 +696,6 @@ that deal with date-parts can be used with ``DateField``::
``TimeField`` truncation
~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 1.11
.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'hour'
@ -764,8 +760,6 @@ truncate function. It's also registered as a transform on ``DateTimeField`` as
.. class:: TruncTime(expression, **extra)
.. versionadded:: 1.11
.. attribute:: lookup_name = 'time'
.. attribute:: output_field = TimeField()

View File

@ -463,8 +463,6 @@ expressions. For more details see :doc:`conditional-expressions`.
.. class:: Subquery(queryset, output_field=None)
.. versionadded:: 1.11
You can add an explicit subquery to a ``QuerySet`` using the ``Subquery``
expression.
@ -498,8 +496,6 @@ Referencing columns from the outer queryset
.. class:: OuterRef(field)
.. versionadded:: 1.11
Use ``OuterRef`` when a queryset in a ``Subquery`` needs to refer to a field
from the outer query. It acts like an :class:`F` expression except that the
check to see if it refers to a valid field isn't made until the outer queryset
@ -549,8 +545,6 @@ row: the email address of the most recently created comment.
.. class:: Exists(queryset)
.. versionadded:: 1.11
``Exists`` is a ``Subquery`` subclass that uses an SQL ``EXISTS`` statement. In
many cases it will perform better than a subquery since the database is able to
stop evaluation of the subquery when a first matching row is found.
@ -949,20 +943,12 @@ calling the appropriate methods on the wrapped expression.
``nulls_first`` and ``nulls_last`` define how null values are sorted.
.. versionchanged:: 1.11
The ``nulls_last`` and ``nulls_first`` parameters were added.
.. method:: desc(nulls_first=False, nulls_last=False)
Returns the expression ready to be sorted in descending order.
``nulls_first`` and ``nulls_last`` define how null values are sorted.
.. versionchanged:: 1.11
The ``nulls_first`` and ``nulls_last`` parameters were added.
.. method:: reverse_ordering()
Returns ``self`` with any modifications required to reverse the sort

View File

@ -315,10 +315,6 @@ This option is valid on all field types except :class:`ManyToManyField` and
Note that when ``unique`` is ``True``, you don't need to specify
:attr:`~Field.db_index`, because ``unique`` implies the creation of an index.
.. versionchanged:: 1.11
In older versions, ``unique=True`` can't be used on :class:`FileField`.
``unique_for_date``
-------------------

View File

@ -6,8 +6,6 @@ Model index reference
.. currentmodule:: django.db.models
.. versionadded:: 1.11
Index classes ease creating database indexes. They can be added using the
:attr:`Meta.indexes <django.db.models.Options.indexes>` option. This document
explains the API references of :class:`Index` which includes the `index

View File

@ -387,8 +387,6 @@ Django quotes column and table names behind the scenes.
.. attribute:: Options.indexes
.. versionadded:: 1.11
A list of :doc:`indexes </ref/models/indexes>` that you want to define on
the model::

View File

@ -610,10 +610,6 @@ You can also refer to fields on related models with reverse relations through
pronounced if you include multiple such fields in your ``values()`` query,
in which case all possible combinations will be returned.
.. versionchanged:: 1.11
Support for ``**expressions`` was added.
``values_list()``
~~~~~~~~~~~~~~~~~
@ -684,10 +680,6 @@ not having any author::
>>> Entry.objects.values_list('authors')
<QuerySet [('Noam Chomsky',), ('George Orwell',), (None,)]>
.. versionchanged:: 1.11
Support for expressions in ``*fields`` was added.
.. versionchanged:: 2.0
The ``named`` parameter was added.
@ -809,8 +801,6 @@ query by calling ``all()`` on a previously evaluated ``QuerySet``.
.. method:: union(*other_qs, all=False)
.. versionadded:: 1.11
Uses SQL's ``UNION`` operator to combine the results of two or more
``QuerySet``\s. For example:
@ -831,17 +821,11 @@ slicing, :meth:`count`, and :meth:`order_by`) are allowed on the resulting
allowed in the combined queries. For example, most databases don't allow
``LIMIT`` or ``OFFSET`` in the combined queries.
.. versionchanged:: 1.11.4
``COUNT(*)`` support was added.
``intersection()``
~~~~~~~~~~~~~~~~~~
.. method:: intersection(*other_qs)
.. versionadded:: 1.11
Uses SQL's ``INTERSECT`` operator to return the shared elements of two or more
``QuerySet``\s. For example:
@ -854,8 +838,6 @@ See :meth:`union` for some restrictions.
.. method:: difference(*other_qs)
.. versionadded:: 1.11
Uses SQL's ``EXCEPT`` operator to keep only elements present in the
``QuerySet`` but not in some other ``QuerySet``\s. For example::
@ -1077,10 +1059,6 @@ database.
:class:`related managers<django.db.models.fields.related.RelatedManager>`,
any prefetched cache for the relation will be cleared.
.. versionchanged:: 1.11
The clearing of the prefetched cache described above was added.
You can also use the normal join syntax to do related fields of related
fields. Suppose we have an additional model to the example above::
@ -1686,10 +1664,6 @@ raised if ``select_for_update()`` is used in autocommit mode.
PostgreSQL doesn't support ``select_for_update()`` with
:class:`~django.db.models.expressions.Window` expressions.
.. versionchanged:: 1.11
The ``skip_locked`` argument was added.
.. versionchanged:: 2.0
The ``of`` argument was added.
@ -1895,10 +1869,6 @@ whenever a request to a page has a side effect on your data. For more, see
chapter because it isn't related to that book, but it can't create it either
because ``title`` field should be unique.
.. versionchanged:: 1.11
Added support for callable values in ``defaults``.
``update_or_create()``
~~~~~~~~~~~~~~~~~~~~~~
@ -1945,10 +1915,6 @@ As described above in :meth:`get_or_create`, this method is prone to a
race-condition which can result in multiple rows being inserted simultaneously
if uniqueness is not enforced at the database level.
.. versionchanged:: 1.11
Added support for callable values in ``defaults``.
``bulk_create()``
~~~~~~~~~~~~~~~~~
@ -2097,10 +2063,6 @@ psycopg mailing list <https://www.postgresql.org/message-id/4D2F2C71.8080805%40d
between the number of rows transferred and the data discarded if the loop
is exited early.
.. versionchanged:: 1.11
PostgreSQL support for server-side cursors was added.
.. versionchanged:: 2.0
The ``chunk_size`` parameter was added.
@ -2831,8 +2793,6 @@ in the database <database-time-zone-definitions>`.
``week``
~~~~~~~~
.. versionadded:: 1.11
For date and datetime fields, return the week number (1-52 or 53) according
to `ISO-8601 <https://en.wikipedia.org/wiki/ISO-8601>`_, i.e., weeks start
on a Monday and the first week starts on or before Thursday.
@ -2902,8 +2862,6 @@ in the database <database-time-zone-definitions>`.
``time``
~~~~~~~~
.. versionadded:: 1.11
For datetime fields, casts the value as time. Allows chaining additional field
lookups. Takes a :class:`datetime.time` value.

View File

@ -173,7 +173,3 @@ Related objects reference
If you use :meth:`~django.db.models.query.QuerySet.prefetch_related`,
the ``add()``, ``remove()``, ``clear()``, and ``set()`` methods clear
the prefetched cache.
.. versionchanged:: 1.11
The clearing of the prefetched cache described above was added.

View File

@ -420,8 +420,6 @@ a subclass of dictionary. Exceptions are outlined here:
.. classmethod:: QueryDict.fromkeys(iterable, value='', mutable=False, encoding=None)
.. versionadded:: 1.11
Creates a new ``QueryDict`` with keys from ``iterable`` and each value
equal to ``value``. For example::

View File

@ -72,8 +72,6 @@ or indexes it has.
.. method:: BaseDatabaseSchemaEditor.add_index(model, index)
.. versionadded:: 1.11
Adds ``index`` to ``model``s table.
``remove_index()``
@ -81,8 +79,6 @@ Adds ``index`` to ``model``s table.
.. method:: BaseDatabaseSchemaEditor.remove_index(model, index)
.. versionadded:: 1.11
Removes ``index`` from ``model``s table.
``alter_unique_together()``

View File

@ -100,14 +100,6 @@ This validation only applies via :meth:`~django.http.HttpRequest.get_host()`;
if your code accesses the ``Host`` header directly from ``request.META`` you
are bypassing this security protection.
.. versionchanged:: 1.11
In older versions, ``ALLOWED_HOSTS`` wasn't checked when running tests.
In older versions, ``ALLOWED_HOSTS`` wasn't checked if ``DEBUG=True``.
This was also changed in Django 1.10.3, 1.9.11, and 1.8.16 to prevent a
DNS rebinding attack.
.. setting:: APPEND_SLASH
``APPEND_SLASH``
@ -390,8 +382,6 @@ cookie is only sent with an HTTPS connection.
``CSRF_USE_SESSIONS``
---------------------
.. versionadded:: 1.11
Default: ``False``
Whether to store the CSRF token in the user's session instead of in a cookie.
@ -646,8 +636,6 @@ When :setting:`USE_TZ` is ``False``, it is an error to set this option.
``DISABLE_SERVER_SIDE_CURSORS``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 1.11.1
Default: ``False``
Set this to ``True`` if you want to disable the use of server-side cursors with
@ -779,8 +767,6 @@ with :ref:`serialized_rollback=True <test-case-serialized-rollback>`.
``TEMPLATE``
^^^^^^^^^^^^
.. versionadded:: 1.11
This is a PostgreSQL-specific setting.
The name of a `template`_ (e.g. ``'template0'``) from which to create the test
@ -836,11 +822,6 @@ This is an Oracle-specific setting.
The password to use when connecting to the Oracle database that will be used
when running tests. If not provided, Django will generate a random password.
.. versionchanged:: 1.11
Older versions used a hardcoded default password. This was also changed
in 1.10.3, 1.9.11, and 1.8.16 to fix possible security implications.
.. setting:: TEST_TBLSPACE
``TBLSPACE``
@ -1362,8 +1343,6 @@ trailing space.
``EMAIL_USE_LOCALTIME``
-----------------------
.. versionadded:: 1.11
Default: ``False``
Whether to send the SMTP ``Date`` header of email messages in the local time
@ -1586,8 +1565,6 @@ generate correct URLs when ``SCRIPT_NAME`` is not ``/``.
``FORM_RENDERER``
-----------------
.. versionadded:: 1.11
Default: ``'``:class:`django.forms.renderers.DjangoTemplates`\ ``'``
The class that renders form widgets. It must implement :ref:`the low-level
@ -2045,10 +2022,6 @@ format has higher precedence and will be applied instead.
See also :setting:`DECIMAL_SEPARATOR`, :setting:`THOUSAND_SEPARATOR` and
:setting:`USE_THOUSAND_SEPARATOR`.
.. versionchanged:: 1.11
Support for non-uniform digit grouping was added.
.. setting:: PREPEND_WWW
``PREPEND_WWW``
@ -2166,8 +2139,6 @@ non-zero value.
``SECURE_HSTS_PRELOAD``
-----------------------
.. versionadded:: 1.11
Default: ``False``
If ``True``, the :class:`~django.middleware.security.SecurityMiddleware` adds

View File

@ -104,11 +104,6 @@ what's passed by :class:`~django.template.backends.django.DjangoTemplates`.
See :ref:`template-loaders` for details.
.. versionchanged:: 1.11
Enabling of the cached template loader when ``debug`` is ``False``
was added.
* ``string_if_invalid`` is the output, as a string, that the template
system should use for invalid (e.g. misspelled) variables.
@ -855,11 +850,6 @@ loaders that come with Django:
},
}]
.. versionchanged:: 1.11
The ability to specify directories for a particular filesystem loader
was added.
``django.template.loaders.app_directories.Loader``
.. class:: app_directories.Loader
@ -947,11 +937,6 @@ loaders that come with Django:
information, see :ref:`template tag thread safety considerations
<template_tag_thread_safety>`.
.. versionchanged:: 1.11
The automatic enabling of the cached template loader when ``debug`` is
``False`` was added.
``django.template.loaders.locmem.Loader``
.. class:: locmem.Loader

View File

@ -887,11 +887,6 @@ attribute and calling the result ``country_list``.
* ``list`` -- a list of all items in this group (e.g., a list of all cities
with country='India').
.. versionchanged:: 1.11
The group object was changed from a dictionary to a
:py:func:`~collections.namedtuple`.
Because ``{% regroup %}`` produces :py:func:`~collections.namedtuple` objects,
you can also write the previous example as::
@ -982,8 +977,6 @@ attribute, allowing you to group on the display string rather than the
``resetcycle``
--------------
.. versionadded:: 1.11
Resets a previous `cycle`_ so that it restarts from its first item at its next
encounter. Without arguments, ``{% resetcycle %}`` will reset the last
``{% cycle %}`` defined in the template.

View File

@ -60,10 +60,6 @@ need to distinguish caches by the ``Accept-language`` header.
``cache_timeout`` is in seconds. The :setting:`CACHE_MIDDLEWARE_SECONDS`
setting is used by default.
.. versionchanged:: 1.11
In older versions, the ``Last-Modified`` header was also set.
.. function:: add_never_cache_headers(response)
Adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate``
@ -391,11 +387,6 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
feed. If no items have either of these attributes this returns the
current UTC date/time.
.. versionchanged:: 1.11
In older versions, it returned the current date/time without any
timezone information.
``Enclosure``
-------------
@ -795,10 +786,6 @@ appropriate entities.
>>> type(mystr)
<type 'str'>
.. versionchanged:: 1.11
Added support for decorator usage.
``django.utils.text``
=====================
@ -807,8 +794,6 @@ appropriate entities.
.. function:: format_lazy(format_string, *args, **kwargs)
.. versionadded:: 1.11
A version of :meth:`str.format` for when ``format_string``, ``args``,
and/or ``kwargs`` contain lazy objects. The first argument is the string to
be formatted. For example::
@ -921,14 +906,8 @@ appropriate entities.
This function doesn't work on naive datetimes; use :func:`make_aware`
instead.
.. versionchanged:: 1.11
In older versions, ``value`` is a required argument.
.. function:: localdate(value=None, timezone=None)
.. versionadded:: 1.11
Uses :func:`localtime` to convert an aware :class:`~datetime.datetime` to a
:meth:`~datetime.datetime.date` in a different time zone, by default the
:ref:`current time zone <default-current-time-zone>`.

View File

@ -281,8 +281,6 @@ to, or in lieu of custom ``field.clean()`` methods.
.. class:: FileExtensionValidator(allowed_extensions, message, code)
.. versionadded:: 1.11
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``.
@ -299,8 +297,6 @@ to, or in lieu of custom ``field.clean()`` methods.
.. data:: validate_image_file_extension
.. versionadded:: 1.11
Uses Pillow to ensure that ``value.name`` (``value`` is a
:class:`~django.core.files.File`) has `a valid image extension
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.

View File

@ -509,10 +509,6 @@ different user model.
from myapp import some_module
some_module.UserModel = get_user_model()
.. versionchanged:: 1.11
The ability to call ``get_user_model()`` at import time was added.
.. _specifying-custom-user-model:
Specifying a custom user model
@ -573,8 +569,6 @@ password resets. You must then provide some key implementation details:
.. attribute:: EMAIL_FIELD
.. versionadded:: 1.11
A string describing the name of the email field on the ``User`` model.
This value is returned by
:meth:`~models.AbstractBaseUser.get_email_field_name`.
@ -663,8 +657,6 @@ The following attributes and methods are available on any subclass of
.. classmethod:: get_email_field_name()
.. versionadded:: 1.11
Returns the name of the email field specified by the
:attr:`~models.CustomUser.EMAIL_FIELD` attribute. Defaults to
``'email'`` if ``EMAIL_FIELD`` isn't specified.
@ -739,8 +731,6 @@ The following attributes and methods are available on any subclass of
.. method:: clean()
.. versionadded:: 1.11
Normalizes the email by calling
:meth:`.BaseUserManager.normalize_email`. If you override this method,
be sure to call ``super()`` to retain the normalization.

View File

@ -136,10 +136,6 @@ Authenticating users
``request`` is an optional :class:`~django.http.HttpRequest` which is
passed on the ``authenticate()`` method of the authentication backends.
.. versionchanged:: 1.11
The optional ``request`` argument was added.
.. note::
This is a low level way to authenticate a set of credentials; for
@ -860,10 +856,6 @@ function.
else:
...
.. versionchanged:: 1.11
Rotating of the session key was added.
.. note::
Since
@ -947,8 +939,6 @@ implementation details see :ref:`using-the-views`.
.. class:: LoginView
.. versionadded:: 1.11
**URL name:** ``login``
See :doc:`the URL documentation </topics/http/urls>` for details on using
@ -1085,8 +1075,6 @@ implementation details see :ref:`using-the-views`.
.. class:: LogoutView
.. versionadded:: 1.11
Logs a user out.
**URL name:** ``logout``
@ -1139,8 +1127,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordChangeView
.. versionadded:: 1.11
**URL name:** ``password_change``
Allows a user to change their password.
@ -1168,8 +1154,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordChangeDoneView
.. versionadded:: 1.11
**URL name:** ``password_change_done``
The page shown after a user has changed their password.
@ -1185,8 +1169,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordResetView
.. versionadded:: 1.11
**URL name:** ``password_reset``
Allows a user to reset their password by generating a one-time use link
@ -1285,8 +1267,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordResetDoneView
.. versionadded:: 1.11
**URL name:** ``password_reset_done``
The page shown after a user has been emailed a link to reset their
@ -1310,8 +1290,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordResetConfirmView
.. versionadded:: 1.11
**URL name:** ``password_reset_confirm``
Presents a form for entering a new password.
@ -1360,8 +1338,6 @@ implementation details see :ref:`using-the-views`.
.. class:: PasswordResetCompleteView
.. versionadded:: 1.11
**URL name:** ``password_reset_complete``
Presents a view which informs the user that the password has been

View File

@ -168,11 +168,6 @@ permanent storage -- they're all intended to be solutions for caching, not
storage -- but we point this out here because memory-based caching is
particularly temporary.
.. versionchanged:: 1.11
The :setting:`LOCATION <CACHES-LOCATION>` setting now supports defining
multiple servers as a comma-delimited string.
.. _database-caching:
Database caching
@ -528,10 +523,6 @@ Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each
* Sets the ``Cache-Control`` header to give a max age for the page --
again, from the :setting:`CACHE_MIDDLEWARE_SECONDS` setting.
.. versionchanged:: 1.11
In older versions, the ``Last-Modified`` header was also set.
See :doc:`/topics/http/middleware` for more on middleware.
If a view sets its own cache expiry time (i.e. it has a ``max-age`` section in

View File

@ -70,14 +70,6 @@ The decorator sets the ``ETag`` and ``Last-Modified`` headers on the response
if they are not already set by the view and if the request's method is safe
(``GET`` or ``HEAD``).
.. versionchanged:: 1.11
In older versions, the return value from ``etag_func()`` was interpreted as
the unquoted part of the ETag. That prevented the use of weak ETags, which
have the format ``W/"<string>"``. The return value is now expected to be
an ETag as defined by the specification (including the quotes), although
the unquoted format is also accepted for backwards compatibility.
Using this feature usefully is probably best explained with an example.
Suppose you have this pair of models, representing a simple blog system::

View File

@ -660,10 +660,6 @@ The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
>>> F('somefield').bitand(16)
.. versionchanged:: 1.11
Support for ``.bitrightshift()`` and ``.bitleftshift()`` was added.
The ``pk`` lookup shortcut
--------------------------

View File

@ -367,11 +367,6 @@ The class has the following methods:
For MIME types starting with ``text/``, binary data is handled as in
``attach()``.
.. versionchanged:: 1.11
Added the fallback to MIME type ``application/octet-stream`` when binary
data for a ``text/*`` attachment cannot be decoded.
Sending alternative content types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -29,10 +29,6 @@ Time zone support is disabled by default. To enable it, set :setting:`USE_TZ =
True <USE_TZ>` in your settings file. Time zone support uses pytz_, which is
installed when you install Django.
.. versionchanged:: 1.11
Older versions don't require ``pytz`` or install it automatically.
.. note::
The default :file:`settings.py` file created by :djadmin:`django-admin

View File

@ -670,10 +670,6 @@ Django can serialize the following:
- Any class reference (must be in module's top-level scope)
- Anything with a custom ``deconstruct()`` method (:ref:`see below <custom-deconstruct-method>`)
.. versionchanged:: 1.11
Serialization support for ``uuid.UUID`` was added.
Django cannot serialize:
- Nested classes

View File

@ -271,10 +271,6 @@ function::
serialize('json', SomeModel.objects.all(), cls=LazyEncoder)
.. versionchanged:: 1.11
The ability to use a custom encoder using ``cls=...`` was added.
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
</ref/contrib/gis/serializers>`.
@ -304,10 +300,6 @@ The JSON serializer uses ``DjangoJSONEncoder`` for encoding. A subclass of
:class:`~decimal.Decimal`, ``Promise`` (``django.utils.functional.lazy()`` objects), :class:`~uuid.UUID`
A string representation of the object.
.. versionchanged:: 1.11
Support for :class:`~datetime.timedelta` was added.
.. _ecma-262: http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15
YAML

View File

@ -441,10 +441,6 @@ adds defaults that differ from Jinja2's for a few options:
Unless all of these conditions are met, passing a function to the template is
simpler and more in line with the design of Jinja2.
.. versionadded:: 1.11
The ``'context_processors'`` option was added.
The default configuration is purposefully kept to a minimum. If a template is
rendered with a request (e.g. when using :py:func:`~django.shortcuts.render`),
the ``Jinja2`` backend adds the globals ``request``, ``csrf_input``, and

View File

@ -117,11 +117,6 @@ Disabling :setting:`ALLOWED_HOSTS` checking (``ALLOWED_HOSTS = ['*']``) when
running tests prevents the test client from raising a helpful error message if
you follow a redirect to an external URL.
.. versionchanged:: 1.11
Older versions didn't validate ``ALLOWED_HOSTS`` while testing so these
techniques weren't necessary.
.. _topics-testing-advanced-multidb:
Tests and multiple databases
@ -410,10 +405,6 @@ testing behavior. This behavior involves:
#. Performing global post-test teardown.
.. versionchanged:: 1.11
Running the system checks was added.
If you define your own test runner class and point :setting:`TEST_RUNNER` at
that class, Django will execute your test runner whenever you run
``./manage.py test``. In this way, it is possible to use any test framework
@ -482,10 +473,6 @@ execute and tear down the test suite.
custom arguments by calling ``parser.add_argument()`` inside the method, so
that the :djadmin:`test` command will be able to use those arguments.
.. versionadded:: 1.11
The ``debug_mode`` keyword argument was added.
Attributes
~~~~~~~~~~
@ -574,8 +561,6 @@ Methods
.. method:: DiscoverRunner.run_checks()
.. versionadded:: 1.11
Runs the :doc:`system checks </topics/checks>`.
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
@ -586,8 +571,6 @@ Methods
.. method:: DiscoverRunner.get_test_runner_kwargs()
.. versionadded:: 1.11
Returns the keyword arguments to instantiate the
``DiscoverRunner.test_runner`` with.
@ -626,10 +609,6 @@ utility methods in the ``django.test.utils`` module.
If ``debug`` isn't ``None``, the :setting:`DEBUG` setting is updated to its
value.
.. versionchanged:: 1.11
The ``debug`` argument was added.
.. function:: teardown_test_environment()
Performs global post-test teardown, such as removing instrumentation from
@ -637,8 +616,6 @@ utility methods in the ``django.test.utils`` module.
.. function:: setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, parallel=0, **kwargs)
.. versionadded:: 1.11
Creates the test databases.
Returns a data structure that provides enough detail to undo the changes
@ -647,8 +624,6 @@ utility methods in the ``django.test.utils`` module.
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
.. versionadded:: 1.11
Destroys the test databases, restoring pre-test conditions.
``old_config`` is a data structure defining the changes in the database

View File

@ -853,13 +853,6 @@ The live server listens on ``localhost`` and binds to port 0 which uses a free
port assigned by the operating system. The server's URL can be accessed with
``self.live_server_url`` during the tests.
.. versionchanged:: 1.11
In older versions, Django tried a predefined port range which could be
customized in various ways including the ``DJANGO_LIVE_TEST_SERVER_ADDRESS``
environment variable. This is removed in favor of the simpler "bind to port
0" technique.
To demonstrate how to use ``LiveServerTestCase``, let's write a simple Selenium
test. First of all, you need to install the `selenium package`_ into your
Python path: