mirror of https://github.com/django/django.git
Removed versionadded/changed annotations for 1.11.
This commit is contained in:
parent
2bd207ada0
commit
5446b72003
|
@ -240,10 +240,6 @@ Methods
|
||||||
``require_ready`` argument is set to ``False``. ``require_ready`` behaves
|
``require_ready`` argument is set to ``False``. ``require_ready`` behaves
|
||||||
exactly as in :meth:`apps.get_model()`.
|
exactly as in :meth:`apps.get_model()`.
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The ``require_ready`` keyword argument was added.
|
|
||||||
|
|
||||||
.. method:: AppConfig.ready()
|
.. method:: AppConfig.ready()
|
||||||
|
|
||||||
Subclasses can override this method to perform initialization tasks such
|
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
|
best to leave ``require_ready`` to the default value of ``True`` whenever
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The ``require_ready`` keyword argument was added.
|
|
||||||
|
|
||||||
.. _app-loading-process:
|
.. _app-loading-process:
|
||||||
|
|
||||||
Initialization process
|
Initialization process
|
||||||
|
|
|
@ -220,10 +220,6 @@ subclass::
|
||||||
e.g. if all the dates are in one month, it'll show the day-level
|
e.g. if all the dates are in one month, it'll show the day-level
|
||||||
drill-down only.
|
drill-down only.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ability to reference fields on related models was added.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
``date_hierarchy`` uses :meth:`QuerySet.datetimes()
|
``date_hierarchy`` uses :meth:`QuerySet.datetimes()
|
||||||
|
@ -1364,8 +1360,6 @@ templates used by the :class:`ModelAdmin` views:
|
||||||
|
|
||||||
.. attribute:: ModelAdmin.popup_response_template
|
.. attribute:: ModelAdmin.popup_response_template
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Path to a custom template, used by :meth:`response_add`,
|
Path to a custom template, used by :meth:`response_add`,
|
||||||
:meth:`response_change`, and :meth:`response_delete`.
|
: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)
|
.. method:: ModelAdmin.get_exclude(request, obj=None)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The ``get_exclude`` method is given the ``HttpRequest`` and the ``obj``
|
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
|
being edited (or ``None`` on an add form) and is expected to return a list
|
||||||
of fields, as described in :attr:`ModelAdmin.exclude`.
|
of fields, as described in :attr:`ModelAdmin.exclude`.
|
||||||
|
@ -2600,10 +2592,6 @@ app or per model. The following can:
|
||||||
* ``object_history.html``
|
* ``object_history.html``
|
||||||
* ``popup_response.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
|
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
|
override them for your entire project. Just place the new version in your
|
||||||
``templates/admin`` directory. This is particularly useful to create custom 404
|
``templates/admin`` directory. This is particularly useful to create custom 404
|
||||||
|
|
|
@ -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
|
The :class:`~django.http.HttpRequest` object, if one was provided to
|
||||||
:func:`~django.contrib.auth.authenticate`.
|
:func:`~django.contrib.auth.authenticate`.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ``request`` argument was added.
|
|
||||||
|
|
||||||
.. _authentication-backends-reference:
|
.. _authentication-backends-reference:
|
||||||
|
|
||||||
Authentication backends
|
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`
|
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
|
||||||
(which passes it on to the backend).
|
(which passes it on to the backend).
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ``request`` argument was added.
|
|
||||||
|
|
||||||
.. method:: get_user_permissions(user_obj, obj=None)
|
.. method:: get_user_permissions(user_obj, obj=None)
|
||||||
|
|
||||||
Returns the set of permission strings the ``user_obj`` has from their
|
Returns the set of permission strings the ``user_obj`` has from their
|
||||||
|
|
|
@ -44,11 +44,6 @@ GeoDjango's admin site
|
||||||
Link to the URL of the OpenLayers JavaScript. Defaults to
|
Link to the URL of the OpenLayers JavaScript. Defaults to
|
||||||
``'https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js'``.
|
``'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
|
.. attribute:: modifiable
|
||||||
|
|
||||||
Defaults to ``True``. When set to ``False``, disables editing of
|
Defaults to ``True``. When set to ``False``, disables editing of
|
||||||
|
|
|
@ -158,14 +158,6 @@ Widget classes
|
||||||
``OpenLayers.js`` file `tailored to your needs`_ in the ``js`` property of
|
``OpenLayers.js`` file `tailored to your needs`_ in the ``js`` property of
|
||||||
the inner ``Media`` class (see :ref:`assets-as-a-static-definition`).
|
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
|
.. _tailored to your needs: http://openlayers.org/en/latest/doc/tutorials/custom-builds.html
|
||||||
|
|
||||||
``OSMWidget``
|
``OSMWidget``
|
||||||
|
@ -195,10 +187,4 @@ Widget classes
|
||||||
applies here. See also this `FAQ answer`_ about ``https`` access to map
|
applies here. See also this `FAQ answer`_ about ``https`` access to map
|
||||||
tiles.
|
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
|
.. _FAQ answer: https://help.openstreetmap.org/questions/10920/how-to-embed-a-map-in-my-https-site
|
||||||
|
|
|
@ -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
|
MySQL and SpatiaLite without LWGEOM don't support area calculations on
|
||||||
geographic SRSes.
|
geographic SRSes.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, a raw value was returned on MySQL when used on
|
|
||||||
projected SRS.
|
|
||||||
|
|
||||||
``AsGeoJSON``
|
``AsGeoJSON``
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -118,10 +113,6 @@ Keyword Argument Description
|
||||||
|
|
||||||
__ https://en.wikipedia.org/wiki/Geography_Markup_Language
|
__ https://en.wikipedia.org/wiki/Geography_Markup_Language
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Oracle support was added.
|
|
||||||
|
|
||||||
``AsKML``
|
``AsKML``
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@ -201,10 +192,6 @@ polygon that can fully contain the geometry.
|
||||||
|
|
||||||
The ``num_seg`` parameter is used only on PostGIS.
|
The ``num_seg`` parameter is used only on PostGIS.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Oracle support was added.
|
|
||||||
|
|
||||||
``Centroid``
|
``Centroid``
|
||||||
============
|
============
|
||||||
|
|
||||||
|
@ -273,11 +260,6 @@ queryset is calculated::
|
||||||
in kilometers. See :doc:`measure` for usage details and the list of
|
in kilometers. See :doc:`measure` for usage details and the list of
|
||||||
:ref:`supported_units`.
|
:ref:`supported_units`.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, a raw value was returned on MySQL when used on
|
|
||||||
projected SRS.
|
|
||||||
|
|
||||||
``Envelope``
|
``Envelope``
|
||||||
============
|
============
|
||||||
|
|
||||||
|
@ -342,10 +324,6 @@ intersection between them.
|
||||||
Accepts a geographic field or expression and tests if the value is well formed.
|
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.
|
Returns ``True`` if its value is a valid geometry and ``False`` otherwise.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
SpatiaLite and Oracle support was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
MySQL support was added.
|
MySQL support was added.
|
||||||
|
@ -369,10 +347,6 @@ resource-intensive) with the ``spheroid`` keyword argument.
|
||||||
|
|
||||||
MySQL doesn't support length calculations on geographic SRSes.
|
MySQL doesn't support length calculations on geographic SRSes.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, a raw value was returned on MySQL.
|
|
||||||
|
|
||||||
``LineLocatePoint``
|
``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
|
already valid are returned without changes. Simple polygons might become a
|
||||||
multipolygon and the result might be of lower dimension than the input.
|
multipolygon and the result might be of lower dimension than the input.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
SpatiaLite support was added.
|
|
||||||
|
|
||||||
``MemSize``
|
``MemSize``
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
@ -440,10 +410,6 @@ in a geometry.
|
||||||
|
|
||||||
On MySQL, returns ``None`` for any non-``LINESTRING`` geometry.
|
On MySQL, returns ``None`` for any non-``LINESTRING`` geometry.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
SpatiaLite support for non-``LINESTRING`` geometries was added.
|
|
||||||
|
|
||||||
``Perimeter``
|
``Perimeter``
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
|
@ -450,8 +450,6 @@ coordinate transformation::
|
||||||
|
|
||||||
.. classmethod:: from_gml(gml_string)
|
.. classmethod:: from_gml(gml_string)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Constructs an :class:`OGRGeometry` from the given GML string.
|
Constructs an :class:`OGRGeometry` from the given GML string.
|
||||||
|
|
||||||
.. classmethod:: from_bbox(bbox)
|
.. classmethod:: from_bbox(bbox)
|
||||||
|
@ -1162,15 +1160,6 @@ blue.
|
||||||
>>> rst.name # Stored in a random path in the vsimem filesystem.
|
>>> rst.name # Stored in a random path in the vsimem filesystem.
|
||||||
'/vsimem/da300bdb-129d-49a8-b336-e410a9428dad'
|
'/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
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
Added the ability to read and write rasters in GDAL's memory-based
|
Added the ability to read and write rasters in GDAL's memory-based
|
||||||
|
|
|
@ -322,10 +322,6 @@ MySQL, PostGIS, SpatiaLite ``ST_IsValid(poly)``
|
||||||
Oracle ``SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(poly, 0.05) = 'TRUE'``
|
Oracle ``SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(poly, 0.05) = 'TRUE'``
|
||||||
========================== ================================================================
|
========================== ================================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Oracle and SpatiaLite support was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
MySQL support was added.
|
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
|
used with projected coordinate systems. Rasters are converted to geometries for
|
||||||
spheroid based lookups.
|
spheroid based lookups.
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Support for the ``'spheroid'`` option on SQLite was added.
|
|
||||||
|
|
||||||
.. versionadded:: 2.0
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
MySQL support was added.
|
MySQL support was added.
|
||||||
|
@ -746,10 +738,6 @@ Oracle ``SDO_WITHIN_DISTANCE(poly, geom, 5)``
|
||||||
SpatiaLite ``PtDistWithin(poly, geom, 5)``
|
SpatiaLite ``PtDistWithin(poly, geom, 5)``
|
||||||
========== ======================================
|
========== ======================================
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
SpatiaLite support was added.
|
|
||||||
|
|
||||||
Aggregate Functions
|
Aggregate Functions
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
@ -173,11 +173,6 @@ Geometries support set-like operators::
|
||||||
>>> ls3 == ls2 # different SRIDs
|
>>> ls3 == ls2 # different SRIDs
|
||||||
False
|
False
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Older versions didn't check the ``srid`` when comparing
|
|
||||||
``GEOSGeometry`` objects using the equality operator.
|
|
||||||
|
|
||||||
Geometry Objects
|
Geometry Objects
|
||||||
================
|
================
|
||||||
|
|
||||||
|
@ -238,8 +233,6 @@ isn't provided, the SRID defaults to 4326.
|
||||||
|
|
||||||
.. classmethod:: GEOSGeometry.from_gml(gml_string)
|
.. classmethod:: GEOSGeometry.from_gml(gml_string)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Constructs a :class:`GEOSGeometry` from the given GML string.
|
Constructs a :class:`GEOSGeometry` from the given GML string.
|
||||||
|
|
||||||
Properties
|
Properties
|
||||||
|
|
|
@ -19,11 +19,6 @@ Program Description Required
|
||||||
Note that older or more recent versions of these libraries *may* also work
|
Note that older or more recent versions of these libraries *may* also work
|
||||||
totally fine with GeoDjango. Your mileage may vary.
|
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:
|
Libs release dates:
|
||||||
GEOS 3.4.0 2013-08-11
|
GEOS 3.4.0 2013-08-11
|
||||||
|
|
|
@ -70,8 +70,6 @@ General-purpose aggregation functions
|
||||||
|
|
||||||
.. class:: JSONBAgg(expressions, filter=None, **extra)
|
.. class:: JSONBAgg(expressions, filter=None, **extra)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Returns the input values as a ``JSON`` array. Requires PostgreSQL ≥ 9.5.
|
Returns the input values as a ``JSON`` array. Requires PostgreSQL ≥ 9.5.
|
||||||
|
|
||||||
``StringAgg``
|
``StringAgg``
|
||||||
|
@ -88,8 +86,6 @@ General-purpose aggregation functions
|
||||||
|
|
||||||
.. attribute:: distinct
|
.. attribute:: distinct
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
An optional boolean argument that determines if concatenated values
|
An optional boolean argument that determines if concatenated values
|
||||||
will be distinct. Defaults to ``False``.
|
will be distinct. Defaults to ``False``.
|
||||||
|
|
||||||
|
|
|
@ -255,8 +255,6 @@ A more useful index is a ``GIN`` index, which you should create using a
|
||||||
|
|
||||||
.. class:: CIText(**options)
|
.. class:: CIText(**options)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
A mixin to create case-insensitive text fields backed by the citext_ type.
|
A mixin to create case-insensitive text fields backed by the citext_ type.
|
||||||
Read about `the performance considerations`_ prior to using it.
|
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
|
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.
|
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::
|
.. note::
|
||||||
|
|
||||||
On occasions it may be useful to require or restrict the keys which are
|
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
|
.. attribute:: encoder
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
An optional JSON-encoding class to serialize data types not supported
|
An optional JSON-encoding class to serialize data types not supported
|
||||||
by the standard JSON serializer (``datetime``, ``uuid``, etc.). For
|
by the standard JSON serializer (``datetime``, ``uuid``, etc.). For
|
||||||
example, you can use the
|
example, you can use the
|
||||||
|
|
|
@ -159,10 +159,6 @@ Fields
|
||||||
valid for a given field. This can be done using the
|
valid for a given field. This can be done using the
|
||||||
:class:`~django.contrib.postgres.validators.KeysValidator`.
|
:class:`~django.contrib.postgres.validators.KeysValidator`.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Added the ability to store nulls.
|
|
||||||
|
|
||||||
``JSONField``
|
``JSONField``
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ PostgreSQL specific model indexes
|
||||||
|
|
||||||
.. module:: django.contrib.postgres.indexes
|
.. module:: django.contrib.postgres.indexes
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
|
The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
|
||||||
available from the ``django.contrib.postgres.indexes`` module.
|
available from the ``django.contrib.postgres.indexes`` module.
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
|
||||||
|
|
||||||
.. class:: BtreeGinExtension()
|
.. class:: BtreeGinExtension()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Install the ``btree_gin`` extension.
|
Install the ``btree_gin`` extension.
|
||||||
|
|
||||||
``BtreeGistExtension``
|
``BtreeGistExtension``
|
||||||
|
@ -72,8 +70,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
|
||||||
|
|
||||||
.. class:: CITextExtension()
|
.. class:: CITextExtension()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Installs the ``citext`` extension.
|
Installs the ``citext`` extension.
|
||||||
|
|
||||||
``CryptoExtension``
|
``CryptoExtension``
|
||||||
|
|
|
@ -305,12 +305,6 @@ passes might be needed. Increase the maximum number of passes by subclassing
|
||||||
``ManifestStaticFilesStorage`` and setting the ``max_post_process_passes``
|
``ManifestStaticFilesStorage`` and setting the ``max_post_process_passes``
|
||||||
attribute. It defaults to 5.
|
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
|
To enable the ``ManifestStaticFilesStorage`` you have to make sure the
|
||||||
following requirements are met:
|
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
|
``ManifestStaticFilesStorage`` and setting the ``manifest_strict`` attribute to
|
||||||
``False`` -- nonexistent paths will remain unchanged.
|
``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
|
Due to the requirement of running :djadmin:`collectstatic`, this storage
|
||||||
typically shouldn't be used when running tests as ``collectstatic`` isn't run
|
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
|
as part of the normal test setup. During testing, ensure that the
|
||||||
|
|
|
@ -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
|
CSRF failures are logged as warnings to the :ref:`django.security.csrf
|
||||||
<django-security-logger>` logger.
|
<django-security-logger>` logger.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, CSRF failures are logged to the ``django.request``
|
|
||||||
logger.
|
|
||||||
|
|
||||||
.. _how-csrf-works:
|
.. _how-csrf-works:
|
||||||
|
|
||||||
How it works
|
How it works
|
||||||
|
|
|
@ -176,8 +176,6 @@ using a migration, use the
|
||||||
Server-side cursors
|
Server-side cursors
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
When using :meth:`QuerySet.iterator()
|
When using :meth:`QuerySet.iterator()
|
||||||
<django.db.models.query.QuerySet.iterator>`, Django opens a :ref:`server-side
|
<django.db.models.query.QuerySet.iterator>`, Django opens a :ref:`server-side
|
||||||
cursor <psycopg2:server-side-cursors>`. By default, PostgreSQL assumes that
|
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
|
Transaction pooling and server-side cursors
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11.1
|
|
||||||
|
|
||||||
Using a connection pooler in transaction pooling mode (e.g. `pgBouncer`_)
|
Using a connection pooler in transaction pooling mode (e.g. `pgBouncer`_)
|
||||||
requires disabling server-side cursors for that connection.
|
requires disabling server-side cursors for that connection.
|
||||||
|
|
||||||
|
@ -254,8 +250,6 @@ management command generates the SQL statements to do that.
|
||||||
Test database templates
|
Test database templates
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
You can use the :setting:`TEST['TEMPLATE'] <TEST_TEMPLATE>` setting to specify
|
You can use the :setting:`TEST['TEMPLATE'] <TEST_TEMPLATE>` setting to specify
|
||||||
a `template`_ (e.g. ``'template0'``) from which to create a test database.
|
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
|
Isolation level
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
When running concurrent loads, database transactions from different sessions
|
When running concurrent loads, database transactions from different sessions
|
||||||
(say, separate threads handling different requests) may interact with each
|
(say, separate threads handling different requests) may interact with each
|
||||||
other. These interactions are affected by each session's `transaction isolation
|
other. These interactions are affected by each session's `transaction isolation
|
||||||
|
|
|
@ -235,8 +235,6 @@ are prefixed by ``"###"``.
|
||||||
|
|
||||||
.. django-admin-option:: --default MODULE
|
.. django-admin-option:: --default MODULE
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The settings module to compare the current settings against. Leave empty to
|
The settings module to compare the current settings against. Leave empty to
|
||||||
compare against Django's default settings.
|
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
|
.. django-admin-option:: --exclude EXCLUDE, -e EXCLUDE
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Excludes loading the fixtures from the given applications and/or models (in the
|
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
|
form of ``app_label`` or ``app_label.ModelName``). Use the option multiple
|
||||||
times to exclude more than one app or model.
|
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
|
On Windows, the REPL is output due to implementation limits of
|
||||||
:func:`select.select` on that platform.
|
:func:`select.select` on that platform.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, the REPL is also output on UNIX systems.
|
|
||||||
|
|
||||||
``showmigrations``
|
``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
|
``app_label``\s arguments limit the output, however, dependencies of provided
|
||||||
apps may also be included.
|
apps may also be included.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, ``showmigrations --plan`` ignores app labels.
|
|
||||||
|
|
||||||
.. django-admin-option:: --database DATABASE
|
.. django-admin-option:: --database DATABASE
|
||||||
|
|
||||||
Specifies the database to examine. Defaults to ``default``.
|
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
|
.. django-admin-option:: --debug-mode
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Sets the :setting:`DEBUG` setting to ``True`` prior to running tests. This may
|
Sets the :setting:`DEBUG` setting to ``True`` prior to running tests. This may
|
||||||
help troubleshoot test failures.
|
help troubleshoot test failures.
|
||||||
|
|
||||||
|
@ -1529,8 +1515,6 @@ instance.
|
||||||
|
|
||||||
.. django-admin:: remove_stale_contenttypes
|
.. django-admin:: remove_stale_contenttypes
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
This command is only available if Django's :doc:`contenttypes app
|
This command is only available if Django's :doc:`contenttypes app
|
||||||
</ref/contrib/contenttypes>` (:mod:`django.contrib.contenttypes`) is installed.
|
</ref/contrib/contenttypes>` (:mod:`django.contrib.contenttypes`) is installed.
|
||||||
|
|
||||||
|
|
|
@ -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,
|
return any results. Most Django projects won't encounter this exception,
|
||||||
but it might be useful for implementing custom lookups and expressions.
|
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``
|
``FieldDoesNotExist``
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -90,10 +90,6 @@ The ``File`` class
|
||||||
``truncate``, ``write``, ``writelines``, ``readable()``, ``writable()``,
|
``truncate``, ``write``, ``writelines``, ``readable()``, ``writable()``,
|
||||||
and ``seekable()``.
|
and ``seekable()``.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ``readable()`` and ``writable()`` methods were added.
|
|
||||||
|
|
||||||
.. currentmodule:: django.core.files.base
|
.. currentmodule:: django.core.files.base
|
||||||
|
|
||||||
The ``ContentFile`` class
|
The ``ContentFile`` class
|
||||||
|
|
|
@ -261,8 +261,6 @@ precedence::
|
||||||
|
|
||||||
.. method:: Form.get_initial_for_field(field, field_name)
|
.. 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
|
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`,
|
field. It retrieves data from :attr:`Form.initial` and :attr:`Field.initial`,
|
||||||
in that order, and evaluates any callable initial values.
|
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_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>
|
<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.
|
This default output is a two-column HTML table, with a ``<tr>`` for each field.
|
||||||
Notice the following:
|
Notice the following:
|
||||||
|
|
||||||
|
@ -734,8 +727,6 @@ Configuring the rendering of a form's widgets
|
||||||
|
|
||||||
.. attribute:: Form.default_renderer
|
.. attribute:: Form.default_renderer
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Specifies the :doc:`renderer <renderers>` to use for the form. Defaults to
|
Specifies the :doc:`renderer <renderers>` to use for the form. Defaults to
|
||||||
``None`` which means to use the default renderer specified by the
|
``None`` which means to use the default renderer specified by the
|
||||||
:setting:`FORM_RENDERER` setting.
|
:setting:`FORM_RENDERER` setting.
|
||||||
|
|
|
@ -386,8 +386,6 @@ For each field, we describe the default widget used if you don't specify
|
||||||
|
|
||||||
.. attribute:: empty_value
|
.. attribute:: empty_value
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The value to use to represent "empty". Defaults to an empty string.
|
The value to use to represent "empty". Defaults to an empty string.
|
||||||
|
|
||||||
``ChoiceField``
|
``ChoiceField``
|
||||||
|
|
|
@ -5,11 +5,6 @@ The form rendering API
|
||||||
.. module:: django.forms.renderers
|
.. module:: django.forms.renderers
|
||||||
:synopsis: Built-in form 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
|
Django's form widgets are rendered using Django's :doc:`template engines
|
||||||
system </topics/templates>`.
|
system </topics/templates>`.
|
||||||
|
|
||||||
|
|
|
@ -238,8 +238,6 @@ foundation for custom widgets.
|
||||||
|
|
||||||
.. method:: get_context(name, value, attrs)
|
.. method:: get_context(name, value, attrs)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Returns a dictionary of values to use when rendering the widget
|
Returns a dictionary of values to use when rendering the widget
|
||||||
template. By default, the dictionary contains a single key,
|
template. By default, the dictionary contains a single key,
|
||||||
``'widget'``, which is a dictionary representation of the widget
|
``'widget'``, which is a dictionary representation of the widget
|
||||||
|
|
|
@ -63,10 +63,6 @@ Adds a few conveniences for perfectionists:
|
||||||
|
|
||||||
* Sets the ``Content-Length`` header for non-streaming responses.
|
* 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
|
.. attribute:: CommonMiddleware.response_redirect_class
|
||||||
|
|
||||||
Defaults to :class:`~django.http.HttpResponsePermanentRedirect`. Subclass
|
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
|
``If-Modified-Since``, the response is replaced by an
|
||||||
:class:`~django.http.HttpResponseNotModified`.
|
: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
|
Locale middleware
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
|
@ -197,8 +197,6 @@ is set, its column name).
|
||||||
|
|
||||||
.. class:: AddIndex(model_name, index)
|
.. class:: AddIndex(model_name, index)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Creates an index in the database table for the model with ``model_name``.
|
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.
|
``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)
|
.. class:: RemoveIndex(model_name, name)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Removes the index named ``name`` from the model with ``model_name``.
|
Removes the index named ``name`` from the model with ``model_name``.
|
||||||
|
|
||||||
Special Operations
|
Special Operations
|
||||||
|
@ -477,10 +473,6 @@ Some things to note:
|
||||||
from_state.clear_delayed_apps_cache()
|
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,
|
* ``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.
|
the one that will be the current state once the migration has finished reversing.
|
||||||
|
|
||||||
|
|
|
@ -433,8 +433,6 @@ Usage example::
|
||||||
|
|
||||||
.. class:: ExtractWeek(expression, tzinfo=None, **extra)
|
.. class:: ExtractWeek(expression, tzinfo=None, **extra)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
.. attribute:: lookup_name = 'week'
|
.. attribute:: lookup_name = 'week'
|
||||||
|
|
||||||
.. class:: ExtractQuarter(expression, tzinfo=None, **extra)
|
.. class:: ExtractQuarter(expression, tzinfo=None, **extra)
|
||||||
|
@ -698,8 +696,6 @@ that deal with date-parts can be used with ``DateField``::
|
||||||
``TimeField`` truncation
|
``TimeField`` truncation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra)
|
.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra)
|
||||||
|
|
||||||
.. attribute:: kind = 'hour'
|
.. attribute:: kind = 'hour'
|
||||||
|
@ -764,8 +760,6 @@ truncate function. It's also registered as a transform on ``DateTimeField`` as
|
||||||
|
|
||||||
.. class:: TruncTime(expression, **extra)
|
.. class:: TruncTime(expression, **extra)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
.. attribute:: lookup_name = 'time'
|
.. attribute:: lookup_name = 'time'
|
||||||
.. attribute:: output_field = TimeField()
|
.. attribute:: output_field = TimeField()
|
||||||
|
|
||||||
|
|
|
@ -463,8 +463,6 @@ expressions. For more details see :doc:`conditional-expressions`.
|
||||||
|
|
||||||
.. class:: Subquery(queryset, output_field=None)
|
.. class:: Subquery(queryset, output_field=None)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
You can add an explicit subquery to a ``QuerySet`` using the ``Subquery``
|
You can add an explicit subquery to a ``QuerySet`` using the ``Subquery``
|
||||||
expression.
|
expression.
|
||||||
|
|
||||||
|
@ -498,8 +496,6 @@ Referencing columns from the outer queryset
|
||||||
|
|
||||||
.. class:: OuterRef(field)
|
.. class:: OuterRef(field)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Use ``OuterRef`` when a queryset in a ``Subquery`` needs to refer to a field
|
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
|
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
|
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)
|
.. class:: Exists(queryset)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
``Exists`` is a ``Subquery`` subclass that uses an SQL ``EXISTS`` statement. In
|
``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
|
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.
|
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.
|
``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)
|
.. method:: desc(nulls_first=False, nulls_last=False)
|
||||||
|
|
||||||
Returns the expression ready to be sorted in descending order.
|
Returns the expression ready to be sorted in descending order.
|
||||||
|
|
||||||
``nulls_first`` and ``nulls_last`` define how null values are sorted.
|
``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()
|
.. method:: reverse_ordering()
|
||||||
|
|
||||||
Returns ``self`` with any modifications required to reverse the sort
|
Returns ``self`` with any modifications required to reverse the sort
|
||||||
|
|
|
@ -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
|
Note that when ``unique`` is ``True``, you don't need to specify
|
||||||
:attr:`~Field.db_index`, because ``unique`` implies the creation of an index.
|
: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``
|
``unique_for_date``
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ Model index reference
|
||||||
|
|
||||||
.. currentmodule:: django.db.models
|
.. currentmodule:: django.db.models
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Index classes ease creating database indexes. They can be added using the
|
Index classes ease creating database indexes. They can be added using the
|
||||||
:attr:`Meta.indexes <django.db.models.Options.indexes>` option. This document
|
:attr:`Meta.indexes <django.db.models.Options.indexes>` option. This document
|
||||||
explains the API references of :class:`Index` which includes the `index
|
explains the API references of :class:`Index` which includes the `index
|
||||||
|
|
|
@ -387,8 +387,6 @@ Django quotes column and table names behind the scenes.
|
||||||
|
|
||||||
.. attribute:: Options.indexes
|
.. attribute:: Options.indexes
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
A list of :doc:`indexes </ref/models/indexes>` that you want to define on
|
A list of :doc:`indexes </ref/models/indexes>` that you want to define on
|
||||||
the model::
|
the model::
|
||||||
|
|
||||||
|
|
|
@ -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,
|
pronounced if you include multiple such fields in your ``values()`` query,
|
||||||
in which case all possible combinations will be returned.
|
in which case all possible combinations will be returned.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Support for ``**expressions`` was added.
|
|
||||||
|
|
||||||
``values_list()``
|
``values_list()``
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -684,10 +680,6 @@ not having any author::
|
||||||
>>> Entry.objects.values_list('authors')
|
>>> Entry.objects.values_list('authors')
|
||||||
<QuerySet [('Noam Chomsky',), ('George Orwell',), (None,)]>
|
<QuerySet [('Noam Chomsky',), ('George Orwell',), (None,)]>
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Support for expressions in ``*fields`` was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
The ``named`` parameter was added.
|
The ``named`` parameter was added.
|
||||||
|
@ -809,8 +801,6 @@ query by calling ``all()`` on a previously evaluated ``QuerySet``.
|
||||||
|
|
||||||
.. method:: union(*other_qs, all=False)
|
.. method:: union(*other_qs, all=False)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Uses SQL's ``UNION`` operator to combine the results of two or more
|
Uses SQL's ``UNION`` operator to combine the results of two or more
|
||||||
``QuerySet``\s. For example:
|
``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
|
allowed in the combined queries. For example, most databases don't allow
|
||||||
``LIMIT`` or ``OFFSET`` in the combined queries.
|
``LIMIT`` or ``OFFSET`` in the combined queries.
|
||||||
|
|
||||||
.. versionchanged:: 1.11.4
|
|
||||||
|
|
||||||
``COUNT(*)`` support was added.
|
|
||||||
|
|
||||||
``intersection()``
|
``intersection()``
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. method:: intersection(*other_qs)
|
.. method:: intersection(*other_qs)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Uses SQL's ``INTERSECT`` operator to return the shared elements of two or more
|
Uses SQL's ``INTERSECT`` operator to return the shared elements of two or more
|
||||||
``QuerySet``\s. For example:
|
``QuerySet``\s. For example:
|
||||||
|
|
||||||
|
@ -854,8 +838,6 @@ See :meth:`union` for some restrictions.
|
||||||
|
|
||||||
.. method:: difference(*other_qs)
|
.. method:: difference(*other_qs)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Uses SQL's ``EXCEPT`` operator to keep only elements present in the
|
Uses SQL's ``EXCEPT`` operator to keep only elements present in the
|
||||||
``QuerySet`` but not in some other ``QuerySet``\s. For example::
|
``QuerySet`` but not in some other ``QuerySet``\s. For example::
|
||||||
|
|
||||||
|
@ -1077,10 +1059,6 @@ database.
|
||||||
:class:`related managers<django.db.models.fields.related.RelatedManager>`,
|
:class:`related managers<django.db.models.fields.related.RelatedManager>`,
|
||||||
any prefetched cache for the relation will be cleared.
|
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
|
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::
|
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
|
PostgreSQL doesn't support ``select_for_update()`` with
|
||||||
:class:`~django.db.models.expressions.Window` expressions.
|
:class:`~django.db.models.expressions.Window` expressions.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ``skip_locked`` argument was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
The ``of`` argument was added.
|
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
|
chapter because it isn't related to that book, but it can't create it either
|
||||||
because ``title`` field should be unique.
|
because ``title`` field should be unique.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Added support for callable values in ``defaults``.
|
|
||||||
|
|
||||||
``update_or_create()``
|
``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
|
race-condition which can result in multiple rows being inserted simultaneously
|
||||||
if uniqueness is not enforced at the database level.
|
if uniqueness is not enforced at the database level.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Added support for callable values in ``defaults``.
|
|
||||||
|
|
||||||
``bulk_create()``
|
``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
|
between the number of rows transferred and the data discarded if the loop
|
||||||
is exited early.
|
is exited early.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
PostgreSQL support for server-side cursors was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
The ``chunk_size`` parameter was added.
|
The ``chunk_size`` parameter was added.
|
||||||
|
@ -2831,8 +2793,6 @@ in the database <database-time-zone-definitions>`.
|
||||||
``week``
|
``week``
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
For date and datetime fields, return the week number (1-52 or 53) according
|
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
|
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.
|
on a Monday and the first week starts on or before Thursday.
|
||||||
|
@ -2902,8 +2862,6 @@ in the database <database-time-zone-definitions>`.
|
||||||
``time``
|
``time``
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
For datetime fields, casts the value as time. Allows chaining additional field
|
For datetime fields, casts the value as time. Allows chaining additional field
|
||||||
lookups. Takes a :class:`datetime.time` value.
|
lookups. Takes a :class:`datetime.time` value.
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,3 @@ Related objects reference
|
||||||
If you use :meth:`~django.db.models.query.QuerySet.prefetch_related`,
|
If you use :meth:`~django.db.models.query.QuerySet.prefetch_related`,
|
||||||
the ``add()``, ``remove()``, ``clear()``, and ``set()`` methods clear
|
the ``add()``, ``remove()``, ``clear()``, and ``set()`` methods clear
|
||||||
the prefetched cache.
|
the prefetched cache.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The clearing of the prefetched cache described above was added.
|
|
||||||
|
|
|
@ -420,8 +420,6 @@ a subclass of dictionary. Exceptions are outlined here:
|
||||||
|
|
||||||
.. classmethod:: QueryDict.fromkeys(iterable, value='', mutable=False, encoding=None)
|
.. classmethod:: QueryDict.fromkeys(iterable, value='', mutable=False, encoding=None)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Creates a new ``QueryDict`` with keys from ``iterable`` and each value
|
Creates a new ``QueryDict`` with keys from ``iterable`` and each value
|
||||||
equal to ``value``. For example::
|
equal to ``value``. For example::
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,6 @@ or indexes it has.
|
||||||
|
|
||||||
.. method:: BaseDatabaseSchemaEditor.add_index(model, index)
|
.. method:: BaseDatabaseSchemaEditor.add_index(model, index)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Adds ``index`` to ``model``’s table.
|
Adds ``index`` to ``model``’s table.
|
||||||
|
|
||||||
``remove_index()``
|
``remove_index()``
|
||||||
|
@ -81,8 +79,6 @@ Adds ``index`` to ``model``’s table.
|
||||||
|
|
||||||
.. method:: BaseDatabaseSchemaEditor.remove_index(model, index)
|
.. method:: BaseDatabaseSchemaEditor.remove_index(model, index)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Removes ``index`` from ``model``’s table.
|
Removes ``index`` from ``model``’s table.
|
||||||
|
|
||||||
``alter_unique_together()``
|
``alter_unique_together()``
|
||||||
|
|
|
@ -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
|
if your code accesses the ``Host`` header directly from ``request.META`` you
|
||||||
are bypassing this security protection.
|
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
|
.. setting:: APPEND_SLASH
|
||||||
|
|
||||||
``APPEND_SLASH``
|
``APPEND_SLASH``
|
||||||
|
@ -390,8 +382,6 @@ cookie is only sent with an HTTPS connection.
|
||||||
``CSRF_USE_SESSIONS``
|
``CSRF_USE_SESSIONS``
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Default: ``False``
|
Default: ``False``
|
||||||
|
|
||||||
Whether to store the CSRF token in the user's session instead of in a cookie.
|
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``
|
``DISABLE_SERVER_SIDE_CURSORS``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 1.11.1
|
|
||||||
|
|
||||||
Default: ``False``
|
Default: ``False``
|
||||||
|
|
||||||
Set this to ``True`` if you want to disable the use of server-side cursors with
|
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``
|
``TEMPLATE``
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
This is a PostgreSQL-specific setting.
|
This is a PostgreSQL-specific setting.
|
||||||
|
|
||||||
The name of a `template`_ (e.g. ``'template0'``) from which to create the test
|
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
|
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.
|
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
|
.. setting:: TEST_TBLSPACE
|
||||||
|
|
||||||
``TBLSPACE``
|
``TBLSPACE``
|
||||||
|
@ -1362,8 +1343,6 @@ trailing space.
|
||||||
``EMAIL_USE_LOCALTIME``
|
``EMAIL_USE_LOCALTIME``
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Default: ``False``
|
Default: ``False``
|
||||||
|
|
||||||
Whether to send the SMTP ``Date`` header of email messages in the local time
|
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``
|
``FORM_RENDERER``
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Default: ``'``:class:`django.forms.renderers.DjangoTemplates`\ ``'``
|
Default: ``'``:class:`django.forms.renderers.DjangoTemplates`\ ``'``
|
||||||
|
|
||||||
The class that renders form widgets. It must implement :ref:`the low-level
|
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
|
See also :setting:`DECIMAL_SEPARATOR`, :setting:`THOUSAND_SEPARATOR` and
|
||||||
:setting:`USE_THOUSAND_SEPARATOR`.
|
:setting:`USE_THOUSAND_SEPARATOR`.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Support for non-uniform digit grouping was added.
|
|
||||||
|
|
||||||
.. setting:: PREPEND_WWW
|
.. setting:: PREPEND_WWW
|
||||||
|
|
||||||
``PREPEND_WWW``
|
``PREPEND_WWW``
|
||||||
|
@ -2166,8 +2139,6 @@ non-zero value.
|
||||||
``SECURE_HSTS_PRELOAD``
|
``SECURE_HSTS_PRELOAD``
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Default: ``False``
|
Default: ``False``
|
||||||
|
|
||||||
If ``True``, the :class:`~django.middleware.security.SecurityMiddleware` adds
|
If ``True``, the :class:`~django.middleware.security.SecurityMiddleware` adds
|
||||||
|
|
|
@ -104,11 +104,6 @@ what's passed by :class:`~django.template.backends.django.DjangoTemplates`.
|
||||||
|
|
||||||
See :ref:`template-loaders` for details.
|
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
|
* ``string_if_invalid`` is the output, as a string, that the template
|
||||||
system should use for invalid (e.g. misspelled) variables.
|
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``
|
``django.template.loaders.app_directories.Loader``
|
||||||
|
|
||||||
.. class:: app_directories.Loader
|
.. class:: app_directories.Loader
|
||||||
|
@ -947,11 +937,6 @@ loaders that come with Django:
|
||||||
information, see :ref:`template tag thread safety considerations
|
information, see :ref:`template tag thread safety considerations
|
||||||
<template_tag_thread_safety>`.
|
<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``
|
``django.template.loaders.locmem.Loader``
|
||||||
|
|
||||||
.. class:: locmem.Loader
|
.. class:: locmem.Loader
|
||||||
|
|
|
@ -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
|
* ``list`` -- a list of all items in this group (e.g., a list of all cities
|
||||||
with country='India').
|
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,
|
Because ``{% regroup %}`` produces :py:func:`~collections.namedtuple` objects,
|
||||||
you can also write the previous example as::
|
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``
|
``resetcycle``
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Resets a previous `cycle`_ so that it restarts from its first item at its next
|
Resets a previous `cycle`_ so that it restarts from its first item at its next
|
||||||
encounter. Without arguments, ``{% resetcycle %}`` will reset the last
|
encounter. Without arguments, ``{% resetcycle %}`` will reset the last
|
||||||
``{% cycle %}`` defined in the template.
|
``{% cycle %}`` defined in the template.
|
||||||
|
|
|
@ -60,10 +60,6 @@ need to distinguish caches by the ``Accept-language`` header.
|
||||||
``cache_timeout`` is in seconds. The :setting:`CACHE_MIDDLEWARE_SECONDS`
|
``cache_timeout`` is in seconds. The :setting:`CACHE_MIDDLEWARE_SECONDS`
|
||||||
setting is used by default.
|
setting is used by default.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, the ``Last-Modified`` header was also set.
|
|
||||||
|
|
||||||
.. function:: add_never_cache_headers(response)
|
.. function:: add_never_cache_headers(response)
|
||||||
|
|
||||||
Adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate``
|
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
|
feed. If no items have either of these attributes this returns the
|
||||||
current UTC date/time.
|
current UTC date/time.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, it returned the current date/time without any
|
|
||||||
timezone information.
|
|
||||||
|
|
||||||
``Enclosure``
|
``Enclosure``
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -795,10 +786,6 @@ appropriate entities.
|
||||||
>>> type(mystr)
|
>>> type(mystr)
|
||||||
<type 'str'>
|
<type 'str'>
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Added support for decorator usage.
|
|
||||||
|
|
||||||
``django.utils.text``
|
``django.utils.text``
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
@ -807,8 +794,6 @@ appropriate entities.
|
||||||
|
|
||||||
.. function:: format_lazy(format_string, *args, **kwargs)
|
.. function:: format_lazy(format_string, *args, **kwargs)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
A version of :meth:`str.format` for when ``format_string``, ``args``,
|
A version of :meth:`str.format` for when ``format_string``, ``args``,
|
||||||
and/or ``kwargs`` contain lazy objects. The first argument is the string to
|
and/or ``kwargs`` contain lazy objects. The first argument is the string to
|
||||||
be formatted. For example::
|
be formatted. For example::
|
||||||
|
@ -921,14 +906,8 @@ appropriate entities.
|
||||||
This function doesn't work on naive datetimes; use :func:`make_aware`
|
This function doesn't work on naive datetimes; use :func:`make_aware`
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
In older versions, ``value`` is a required argument.
|
|
||||||
|
|
||||||
.. function:: localdate(value=None, timezone=None)
|
.. function:: localdate(value=None, timezone=None)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Uses :func:`localtime` to convert an aware :class:`~datetime.datetime` to a
|
Uses :func:`localtime` to convert an aware :class:`~datetime.datetime` to a
|
||||||
:meth:`~datetime.datetime.date` in a different time zone, by default the
|
:meth:`~datetime.datetime.date` in a different time zone, by default the
|
||||||
:ref:`current time zone <default-current-time-zone>`.
|
:ref:`current time zone <default-current-time-zone>`.
|
||||||
|
|
|
@ -281,8 +281,6 @@ to, or in lieu of custom ``field.clean()`` methods.
|
||||||
|
|
||||||
.. class:: FileExtensionValidator(allowed_extensions, message, code)
|
.. class:: FileExtensionValidator(allowed_extensions, message, code)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
|
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
|
||||||
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
|
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
|
||||||
a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``.
|
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
|
.. data:: validate_image_file_extension
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Uses Pillow to ensure that ``value.name`` (``value`` is a
|
Uses Pillow to ensure that ``value.name`` (``value`` is a
|
||||||
:class:`~django.core.files.File`) has `a valid image extension
|
:class:`~django.core.files.File`) has `a valid image extension
|
||||||
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.
|
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.
|
||||||
|
|
|
@ -509,10 +509,6 @@ different user model.
|
||||||
from myapp import some_module
|
from myapp import some_module
|
||||||
some_module.UserModel = get_user_model()
|
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-custom-user-model:
|
||||||
|
|
||||||
Specifying a 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
|
.. attribute:: EMAIL_FIELD
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
A string describing the name of the email field on the ``User`` model.
|
A string describing the name of the email field on the ``User`` model.
|
||||||
This value is returned by
|
This value is returned by
|
||||||
:meth:`~models.AbstractBaseUser.get_email_field_name`.
|
: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()
|
.. classmethod:: get_email_field_name()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Returns the name of the email field specified by the
|
Returns the name of the email field specified by the
|
||||||
:attr:`~models.CustomUser.EMAIL_FIELD` attribute. Defaults to
|
:attr:`~models.CustomUser.EMAIL_FIELD` attribute. Defaults to
|
||||||
``'email'`` if ``EMAIL_FIELD`` isn't specified.
|
``'email'`` if ``EMAIL_FIELD`` isn't specified.
|
||||||
|
@ -739,8 +731,6 @@ The following attributes and methods are available on any subclass of
|
||||||
|
|
||||||
.. method:: clean()
|
.. method:: clean()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Normalizes the email by calling
|
Normalizes the email by calling
|
||||||
:meth:`.BaseUserManager.normalize_email`. If you override this method,
|
:meth:`.BaseUserManager.normalize_email`. If you override this method,
|
||||||
be sure to call ``super()`` to retain the normalization.
|
be sure to call ``super()`` to retain the normalization.
|
||||||
|
|
|
@ -136,10 +136,6 @@ Authenticating users
|
||||||
``request`` is an optional :class:`~django.http.HttpRequest` which is
|
``request`` is an optional :class:`~django.http.HttpRequest` which is
|
||||||
passed on the ``authenticate()`` method of the authentication backends.
|
passed on the ``authenticate()`` method of the authentication backends.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The optional ``request`` argument was added.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
This is a low level way to authenticate a set of credentials; for
|
This is a low level way to authenticate a set of credentials; for
|
||||||
|
@ -860,10 +856,6 @@ function.
|
||||||
else:
|
else:
|
||||||
...
|
...
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Rotating of the session key was added.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Since
|
Since
|
||||||
|
@ -947,8 +939,6 @@ implementation details see :ref:`using-the-views`.
|
||||||
|
|
||||||
.. class:: LoginView
|
.. class:: LoginView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``login``
|
**URL name:** ``login``
|
||||||
|
|
||||||
See :doc:`the URL documentation </topics/http/urls>` for details on using
|
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
|
.. class:: LogoutView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Logs a user out.
|
Logs a user out.
|
||||||
|
|
||||||
**URL name:** ``logout``
|
**URL name:** ``logout``
|
||||||
|
@ -1139,8 +1127,6 @@ implementation details see :ref:`using-the-views`.
|
||||||
|
|
||||||
.. class:: PasswordChangeView
|
.. class:: PasswordChangeView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_change``
|
**URL name:** ``password_change``
|
||||||
|
|
||||||
Allows a user to change their password.
|
Allows a user to change their password.
|
||||||
|
@ -1168,8 +1154,6 @@ implementation details see :ref:`using-the-views`.
|
||||||
|
|
||||||
.. class:: PasswordChangeDoneView
|
.. class:: PasswordChangeDoneView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_change_done``
|
**URL name:** ``password_change_done``
|
||||||
|
|
||||||
The page shown after a user has changed their password.
|
The page shown after a user has changed their password.
|
||||||
|
@ -1185,8 +1169,6 @@ implementation details see :ref:`using-the-views`.
|
||||||
|
|
||||||
.. class:: PasswordResetView
|
.. class:: PasswordResetView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_reset``
|
**URL name:** ``password_reset``
|
||||||
|
|
||||||
Allows a user to reset their password by generating a one-time use link
|
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
|
.. class:: PasswordResetDoneView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_reset_done``
|
**URL name:** ``password_reset_done``
|
||||||
|
|
||||||
The page shown after a user has been emailed a link to reset their
|
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
|
.. class:: PasswordResetConfirmView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_reset_confirm``
|
**URL name:** ``password_reset_confirm``
|
||||||
|
|
||||||
Presents a form for entering a new password.
|
Presents a form for entering a new password.
|
||||||
|
@ -1360,8 +1338,6 @@ implementation details see :ref:`using-the-views`.
|
||||||
|
|
||||||
.. class:: PasswordResetCompleteView
|
.. class:: PasswordResetCompleteView
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
**URL name:** ``password_reset_complete``
|
**URL name:** ``password_reset_complete``
|
||||||
|
|
||||||
Presents a view which informs the user that the password has been
|
Presents a view which informs the user that the password has been
|
||||||
|
|
|
@ -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
|
storage -- but we point this out here because memory-based caching is
|
||||||
particularly temporary.
|
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:
|
||||||
|
|
||||||
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 --
|
* Sets the ``Cache-Control`` header to give a max age for the page --
|
||||||
again, from the :setting:`CACHE_MIDDLEWARE_SECONDS` setting.
|
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.
|
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
|
If a view sets its own cache expiry time (i.e. it has a ``max-age`` section in
|
||||||
|
|
|
@ -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
|
if they are not already set by the view and if the request's method is safe
|
||||||
(``GET`` or ``HEAD``).
|
(``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.
|
Using this feature usefully is probably best explained with an example.
|
||||||
Suppose you have this pair of models, representing a simple blog system::
|
Suppose you have this pair of models, representing a simple blog system::
|
||||||
|
|
||||||
|
|
|
@ -660,10 +660,6 @@ The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
|
||||||
|
|
||||||
>>> F('somefield').bitand(16)
|
>>> F('somefield').bitand(16)
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Support for ``.bitrightshift()`` and ``.bitleftshift()`` was added.
|
|
||||||
|
|
||||||
The ``pk`` lookup shortcut
|
The ``pk`` lookup shortcut
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
|
|
@ -367,11 +367,6 @@ The class has the following methods:
|
||||||
For MIME types starting with ``text/``, binary data is handled as in
|
For MIME types starting with ``text/``, binary data is handled as in
|
||||||
``attach()``.
|
``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
|
Sending alternative content types
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -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
|
True <USE_TZ>` in your settings file. Time zone support uses pytz_, which is
|
||||||
installed when you install Django.
|
installed when you install Django.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
Older versions don't require ``pytz`` or install it automatically.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The default :file:`settings.py` file created by :djadmin:`django-admin
|
The default :file:`settings.py` file created by :djadmin:`django-admin
|
||||||
|
|
|
@ -670,10 +670,6 @@ Django can serialize the following:
|
||||||
- Any class reference (must be in module's top-level scope)
|
- Any class reference (must be in module's top-level scope)
|
||||||
- Anything with a custom ``deconstruct()`` method (:ref:`see below <custom-deconstruct-method>`)
|
- 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:
|
Django cannot serialize:
|
||||||
|
|
||||||
- Nested classes
|
- Nested classes
|
||||||
|
|
|
@ -271,10 +271,6 @@ function::
|
||||||
|
|
||||||
serialize('json', SomeModel.objects.all(), cls=LazyEncoder)
|
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
|
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
||||||
</ref/contrib/gis/serializers>`.
|
</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`
|
:class:`~decimal.Decimal`, ``Promise`` (``django.utils.functional.lazy()`` objects), :class:`~uuid.UUID`
|
||||||
A string representation of the object.
|
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
|
.. _ecma-262: http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15
|
||||||
|
|
||||||
YAML
|
YAML
|
||||||
|
|
|
@ -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
|
Unless all of these conditions are met, passing a function to the template is
|
||||||
simpler and more in line with the design of Jinja2.
|
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
|
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`),
|
rendered with a request (e.g. when using :py:func:`~django.shortcuts.render`),
|
||||||
the ``Jinja2`` backend adds the globals ``request``, ``csrf_input``, and
|
the ``Jinja2`` backend adds the globals ``request``, ``csrf_input``, and
|
||||||
|
|
|
@ -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
|
running tests prevents the test client from raising a helpful error message if
|
||||||
you follow a redirect to an external URL.
|
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:
|
.. _topics-testing-advanced-multidb:
|
||||||
|
|
||||||
Tests and multiple databases
|
Tests and multiple databases
|
||||||
|
@ -410,10 +405,6 @@ testing behavior. This behavior involves:
|
||||||
|
|
||||||
#. Performing global post-test teardown.
|
#. 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
|
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
|
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
|
``./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
|
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
||||||
that the :djadmin:`test` command will be able to use those arguments.
|
that the :djadmin:`test` command will be able to use those arguments.
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
The ``debug_mode`` keyword argument was added.
|
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -574,8 +561,6 @@ Methods
|
||||||
|
|
||||||
.. method:: DiscoverRunner.run_checks()
|
.. method:: DiscoverRunner.run_checks()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Runs the :doc:`system checks </topics/checks>`.
|
Runs the :doc:`system checks </topics/checks>`.
|
||||||
|
|
||||||
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
||||||
|
@ -586,8 +571,6 @@ Methods
|
||||||
|
|
||||||
.. method:: DiscoverRunner.get_test_runner_kwargs()
|
.. method:: DiscoverRunner.get_test_runner_kwargs()
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Returns the keyword arguments to instantiate the
|
Returns the keyword arguments to instantiate the
|
||||||
``DiscoverRunner.test_runner`` with.
|
``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
|
If ``debug`` isn't ``None``, the :setting:`DEBUG` setting is updated to its
|
||||||
value.
|
value.
|
||||||
|
|
||||||
.. versionchanged:: 1.11
|
|
||||||
|
|
||||||
The ``debug`` argument was added.
|
|
||||||
|
|
||||||
.. function:: teardown_test_environment()
|
.. function:: teardown_test_environment()
|
||||||
|
|
||||||
Performs global post-test teardown, such as removing instrumentation from
|
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)
|
.. function:: setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, parallel=0, **kwargs)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Creates the test databases.
|
Creates the test databases.
|
||||||
|
|
||||||
Returns a data structure that provides enough detail to undo the changes
|
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)
|
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
|
||||||
|
|
||||||
Destroys the test databases, restoring pre-test conditions.
|
Destroys the test databases, restoring pre-test conditions.
|
||||||
|
|
||||||
``old_config`` is a data structure defining the changes in the database
|
``old_config`` is a data structure defining the changes in the database
|
||||||
|
|
|
@ -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
|
port assigned by the operating system. The server's URL can be accessed with
|
||||||
``self.live_server_url`` during the tests.
|
``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
|
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
|
test. First of all, you need to install the `selenium package`_ into your
|
||||||
Python path:
|
Python path:
|
||||||
|
|
Loading…
Reference in New Issue