Removed versionadded/changed annotations for 1.10.
This commit is contained in:
parent
401c5b2e42
commit
e27e4c0339
|
@ -75,10 +75,6 @@ regardless of ``AUTHENTICATION_BACKENDS``.
|
|||
:class:`~django.contrib.auth.backends.AllowAllUsersRemoteUserBackend` if
|
||||
you want to allow them to.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, inactive users weren't rejected as described above.
|
||||
|
||||
If your authentication mechanism uses a custom HTTP header and not
|
||||
``REMOTE_USER``, you can subclass ``RemoteUserMiddleware`` and set the
|
||||
``header`` attribute to the desired ``request.META`` key. For example::
|
||||
|
|
|
@ -227,8 +227,6 @@ All attributes can be set in your derived class and can be used in
|
|||
|
||||
.. attribute:: BaseCommand.requires_migrations_checks
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A boolean; if ``True``, the command prints a warning if the set of
|
||||
migrations on disk don't match the migrations in the database. A warning
|
||||
doesn't prevent the command from executing. Default value is ``False``.
|
||||
|
|
|
@ -464,10 +464,6 @@ need the foreign keys that point to that field to use the same data type::
|
|||
def rel_db_type(self, connection):
|
||||
return 'integer UNSIGNED'
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The :meth:`~Field.rel_db_type` method was added.
|
||||
|
||||
.. _converting-values-to-python-objects:
|
||||
|
||||
Converting values to Python objects
|
||||
|
|
|
@ -189,8 +189,6 @@ the respective field according to your needs.
|
|||
Non-atomic migrations
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
On databases that support DDL transactions (SQLite and PostgreSQL), migrations
|
||||
will run inside a transaction by default. For use cases such as performing data
|
||||
migrations on large tables, you may want to prevent a migration from running in
|
||||
|
|
|
@ -428,8 +428,6 @@ a temporary ``Apps`` instance::
|
|||
|
||||
.. function:: django.test.utils.isolate_apps(*app_labels, attr_name=None, kwarg_name=None)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Since this pattern involves a lot of boilerplate, Django provides the
|
||||
:func:`~django.test.utils.isolate_apps` decorator. It's used like this::
|
||||
|
||||
|
|
|
@ -401,10 +401,6 @@ application registry.
|
|||
:setting:`FORCE_SCRIPT_NAME` if defined, or ``/`` otherwise.
|
||||
* Initializing the application registry.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to set the URL resolver script prefix is new.
|
||||
|
||||
This function is called automatically:
|
||||
|
||||
* When running an HTTP server via Django's WSGI support.
|
||||
|
|
|
@ -22,10 +22,6 @@ MRO is an acronym for Method Resolution Order.
|
|||
this base class. It isn't strictly a generic view and thus can also be
|
||||
imported from ``django.views``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to import from ``django.views`` was added.
|
||||
|
||||
**Method Flowchart**
|
||||
|
||||
1. :meth:`dispatch()`
|
||||
|
|
|
@ -1151,8 +1151,6 @@ subclass::
|
|||
|
||||
.. attribute:: ModelAdmin.save_as_continue
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
When :attr:`save_as=True <save_as>`, the default redirect after saving the
|
||||
new object is to the change view for that object. If you set
|
||||
``save_as_continue=False``, the redirect will be to the changelist view.
|
||||
|
@ -1950,10 +1948,6 @@ To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
|
|||
in your own admin JavaScript without including a second copy, you can use the
|
||||
``django.jQuery`` object on changelist and add/edit views.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The embedded jQuery was upgraded from 2.1.4 to 2.2.3.
|
||||
|
||||
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
||||
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
||||
a specific need. For example, if you require the jQuery library to be in the
|
||||
|
@ -2100,8 +2094,6 @@ The ``InlineModelAdmin`` class adds:
|
|||
|
||||
.. attribute:: InlineModelAdmin.classes
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A list or tuple containing extra CSS classes to apply to the fieldset that
|
||||
is rendered for the inlines. Defaults to ``None``. As with classes
|
||||
configured in :attr:`~ModelAdmin.fieldsets`, inlines with a ``collapse``
|
||||
|
@ -2588,11 +2580,6 @@ Templates can override or extend base admin templates as described in
|
|||
the current request has ``request.META['SCRIPT_NAME']`` set and uses that
|
||||
value if ``site_url`` isn't set to something other than ``/``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``SCRIPT_NAME`` support described in the previous paragraph was
|
||||
added.
|
||||
|
||||
.. attribute:: AdminSite.index_title
|
||||
|
||||
The text to put at the top of the admin index page (a string). By default,
|
||||
|
@ -2892,12 +2879,6 @@ password box.
|
|||
advised to use the :meth:`get_change_message` method to retrieve this value
|
||||
instead of accessing it directly.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Previously, this attribute was always a plain string. It is
|
||||
now JSON-structured so that the message can be translated in the current
|
||||
user language. Old messages are untouched.
|
||||
|
||||
``LogEntry`` methods
|
||||
--------------------
|
||||
|
||||
|
@ -2907,8 +2888,6 @@ password box.
|
|||
|
||||
.. method:: LogEntry.get_change_message()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Formats and translates :attr:`change_message` into the current user
|
||||
language. Messages created before Django 1.10 will always be displayed in
|
||||
the language in which they were logged.
|
||||
|
|
|
@ -41,10 +41,6 @@ Fields
|
|||
on Python 2, with the option to customize the behavior using
|
||||
:attr:`.User.username_validator`.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``max_length`` increased from 30 to 150 characters.
|
||||
|
||||
.. attribute:: first_name
|
||||
|
||||
Optional. 30 characters or fewer.
|
||||
|
@ -99,13 +95,6 @@ Fields
|
|||
authentication in the Django admin all return ``False`` for inactive
|
||||
users.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions,
|
||||
:class:`~django.contrib.auth.backends.ModelBackend` and
|
||||
:class:`~django.contrib.auth.backends.RemoteUserBackend` allowed
|
||||
inactive users to authenticate.
|
||||
|
||||
.. attribute:: is_superuser
|
||||
|
||||
Boolean. Designates that this user has all permissions without
|
||||
|
@ -147,8 +136,6 @@ Attributes
|
|||
|
||||
.. attribute:: username_validator
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Points to a validator instance used to validate usernames. Defaults to
|
||||
:class:`validators.UnicodeUsernameValidator` on Python 3 and
|
||||
:class:`validators.ASCIIUsernameValidator` on Python 2.
|
||||
|
@ -402,16 +389,12 @@ Validators
|
|||
|
||||
.. class:: validators.ASCIIUsernameValidator
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A field validator allowing only ASCII letters, in addition to ``@``, ``.``,
|
||||
``+``, ``-``, and ``_``. The default validator for ``User.username`` on
|
||||
Python 2.
|
||||
|
||||
.. class:: validators.UnicodeUsernameValidator
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A field validator allowing Unicode letters, in addition to ``@``, ``.``,
|
||||
``+``, ``-``, and ``_``. The default validator for ``User.username`` on
|
||||
Python 3.
|
||||
|
@ -568,8 +551,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
|||
|
||||
.. method:: ModelBackend.user_can_authenticate()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns whether the user is allowed to authenticate. To match the
|
||||
behavior of :class:`~django.contrib.auth.forms.AuthenticationForm`
|
||||
which :meth:`prohibits inactive users from logging in
|
||||
|
@ -581,8 +562,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
|||
|
||||
.. class:: AllowAllUsersModelBackend
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Same as :class:`ModelBackend` except that it doesn't reject inactive users
|
||||
because :meth:`~ModelBackend.user_can_authenticate` always returns ``True``.
|
||||
|
||||
|
@ -637,8 +616,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
|||
|
||||
.. method:: RemoteUserBackend.user_can_authenticate()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns whether the user is allowed to authenticate. This method returns
|
||||
``False`` for users with :attr:`is_active=False
|
||||
<django.contrib.auth.models.User.is_active>`. Custom user models that don't
|
||||
|
@ -647,8 +624,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
|||
|
||||
.. class:: AllowAllUsersRemoteUserBackend
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Same as :class:`RemoteUserBackend` except that it doesn't reject inactive
|
||||
users because :attr:`~RemoteUserBackend.user_can_authenticate` always
|
||||
returns ``True``.
|
||||
|
|
|
@ -56,10 +56,6 @@ Raster Support
|
|||
lookups are available for raster fields, but spatial database functions and
|
||||
aggregates aren't implemented for raster fields.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
``RasterField`` now supports spatial lookups.
|
||||
|
||||
Creating and Saving Models with Geometry Fields
|
||||
===============================================
|
||||
|
||||
|
@ -173,8 +169,6 @@ GeoJSON , WKT, or HEXEWKB), and ``rst`` is a
|
|||
Raster Lookups
|
||||
--------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The raster lookup syntax is similar to the syntax for geometries. The only
|
||||
difference is that a band index can be specified as additional input. If no band
|
||||
index is specified, the first band is used by default (index ``0``). In that
|
||||
|
|
|
@ -202,10 +202,6 @@ Accepts two geographic fields or expressions and returns the geometric
|
|||
difference, that is the part of geometry A that does not intersect with
|
||||
geometry B.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
``Distance``
|
||||
============
|
||||
|
||||
|
@ -288,10 +284,6 @@ representation of the geometry.
|
|||
The ``precision`` keyword argument controls the number of characters in the
|
||||
result.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
SpatiaLite support was added.
|
||||
|
||||
__ https://en.wikipedia.org/wiki/Geohash
|
||||
|
||||
``Intersection``
|
||||
|
@ -304,17 +296,11 @@ __ https://en.wikipedia.org/wiki/Geohash
|
|||
Accepts two geographic fields or expressions and returns the geometric
|
||||
intersection between them.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
``IsValid``
|
||||
===========
|
||||
|
||||
.. class:: IsValid(expr)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
*Availability*: PostGIS, Oracle, SpatiaLite (LWGEOM)
|
||||
|
||||
Accepts a geographic field or expression and tests if the value is well formed.
|
||||
|
@ -351,8 +337,6 @@ resource-intensive) with the ``spheroid`` keyword argument.
|
|||
|
||||
.. class:: MakeValid(expr)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
*Availability*: PostGIS, SpatiaLite (LWGEOM)
|
||||
|
||||
Accepts a geographic field or expression and attempts to convert the value into
|
||||
|
@ -469,10 +453,6 @@ Accepts two geographic fields or expressions and returns the geometric
|
|||
symmetric difference (union without the intersection) between the given
|
||||
parameters.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
``Transform``
|
||||
=============
|
||||
|
||||
|
|
|
@ -1215,8 +1215,6 @@ blue.
|
|||
|
||||
.. attribute:: srid
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The Spatial Reference System Identifier (SRID) of the raster. This
|
||||
property is a shortcut to getting or setting the SRID through the
|
||||
:attr:`srs` attribute.
|
||||
|
@ -1418,8 +1416,6 @@ blue.
|
|||
|
||||
.. method:: statistics(refresh=False, approximate=False)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Compute statistics on the pixel values of this band. The return value
|
||||
is a tuple with the following structure:
|
||||
``(minimum, maximum, mean, standard deviation)``.
|
||||
|
@ -1455,15 +1451,11 @@ blue.
|
|||
|
||||
.. attribute:: mean
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The mean of all pixel values of the band (excluding the "no data"
|
||||
value).
|
||||
|
||||
.. attribute:: std
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The standard deviation of all pixel values of the band (excluding the
|
||||
"no data" value).
|
||||
|
||||
|
@ -1476,11 +1468,6 @@ blue.
|
|||
To delete an existing "no data" value, set this property to ``None``
|
||||
(requires GDAL ≥ 2.1).
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The "no data" value can now be deleted by setting the
|
||||
``nodata_value`` attribute to ``None``.
|
||||
|
||||
.. method:: datatype(as_string=False)
|
||||
|
||||
The data type contained in the band, as an integer constant between 0
|
||||
|
@ -1550,11 +1537,6 @@ blue.
|
|||
[2, 2, 2, 2],
|
||||
[3, 3, 3, 3]], dtype=uint8)
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``shape`` parameter and the ability to replicate data input when
|
||||
setting ``GDALBand`` data was added.
|
||||
|
||||
Settings
|
||||
========
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@ For an introduction, see the :ref:`spatial lookups introduction
|
|||
compatible with a particular spatial backend, refer to the
|
||||
:ref:`spatial lookup compatibility table <spatial-lookup-compatibility>`.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Spatial lookups now support raster input.
|
||||
|
||||
Lookups with rasters
|
||||
--------------------
|
||||
|
||||
|
@ -298,8 +294,6 @@ SpatiaLite ``Intersects(poly, geom)``
|
|||
``isvalid``
|
||||
-----------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
*Availability*: PostGIS
|
||||
|
||||
Tests if the geometry is valid.
|
||||
|
@ -603,10 +597,6 @@ of ``ST_Distance_Sphere``. The simpler ``ST_Distance`` function is used with
|
|||
projected coordinate systems. Rasters are converted to geometries for spheroid
|
||||
based lookups.
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ability to pass an expression as the distance value was added.
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Support for the ``'spheroid'`` option on SQLite was added.
|
||||
|
@ -797,10 +787,6 @@ Example::
|
|||
Returns a ``LineString`` constructed from the point field geometries in the
|
||||
``QuerySet``. Currently, ordering the queryset has no effect.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
SpatiaLite support was added.
|
||||
|
||||
Example::
|
||||
|
||||
>>> qs = City.objects.filter(name__in=('Houston', 'Dallas')).aggregate(MakeLine('poly'))
|
||||
|
|
|
@ -379,10 +379,6 @@ another object.
|
|||
|
||||
Returns the Well-Known Text of the geometry (an OGC standard).
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Non-significant zeros are stripped from the output.
|
||||
|
||||
__ https://developers.google.com/kml/documentation/
|
||||
|
||||
Spatial Predicate Methods
|
||||
|
@ -399,8 +395,6 @@ return a boolean.
|
|||
|
||||
.. method:: GEOSGeometry.covers(other)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns ``True`` if this geometry covers the specified geometry.
|
||||
|
||||
The ``covers`` predicate has the following equivalent definitions:
|
||||
|
@ -569,8 +563,6 @@ Topological Properties
|
|||
|
||||
.. attribute:: GEOSGeometry.unary_union
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Computes the union of all the elements of this geometry.
|
||||
|
||||
The result obeys the following contract:
|
||||
|
@ -646,12 +638,6 @@ Other Properties & Methods
|
|||
doesn't impose any constraints on the geometry's SRID if called with a
|
||||
:class:`~django.contrib.gis.gdal.CoordTransform` object.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, it required the geometry's SRID to be a
|
||||
positive integer even if it was called with a
|
||||
:class:`~django.contrib.gis.gdal.CoordTransform` object.
|
||||
|
||||
.. method:: GEOSGeometry.normalize()
|
||||
|
||||
Converts this geometry to canonical form::
|
||||
|
@ -681,10 +667,6 @@ Other Properties & Methods
|
|||
>>> pnt = Point()
|
||||
>>> pnt = Point([])
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``Point`` couldn't be instantiated.
|
||||
|
||||
``LineString``
|
||||
--------------
|
||||
|
||||
|
@ -709,14 +691,8 @@ Other Properties & Methods
|
|||
>>> ls = LineString()
|
||||
>>> ls = LineString([])
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``LineString`` couldn't be instantiated.
|
||||
|
||||
.. attribute:: closed
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns whether or not this ``LineString`` is closed.
|
||||
|
||||
``LinearRing``
|
||||
|
@ -749,10 +725,6 @@ Other Properties & Methods
|
|||
>>> poly = Polygon(ext_coords, int_coords)
|
||||
>>> poly = Polygon(LinearRing(ext_coords), LinearRing(int_coords))
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``Polygon`` couldn't be instantiated.
|
||||
|
||||
.. classmethod:: from_bbox(bbox)
|
||||
|
||||
Returns a polygon object from the given bounding-box, a 4-tuple
|
||||
|
@ -787,10 +759,6 @@ Geometry Collections
|
|||
>>> mp = MultiPoint(Point(0, 0), Point(1, 1))
|
||||
>>> mp = MultiPoint( (Point(0, 0), Point(1, 1)) )
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``MultiPoint`` couldn't be instantiated.
|
||||
|
||||
``MultiLineString``
|
||||
-------------------
|
||||
|
||||
|
@ -805,11 +773,6 @@ Geometry Collections
|
|||
>>> mls = MultiLineString(ls1, ls2)
|
||||
>>> mls = MultiLineString([ls1, ls2])
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``MultiLineString`` couldn't be
|
||||
instantiated.
|
||||
|
||||
.. attribute:: merged
|
||||
|
||||
Returns a :class:`LineString` representing the line merge of
|
||||
|
@ -817,8 +780,6 @@ Geometry Collections
|
|||
|
||||
.. attribute:: closed
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns ``True`` if and only if all elements are closed. Requires GEOS 3.5.
|
||||
|
||||
``MultiPolygon``
|
||||
|
@ -834,11 +795,6 @@ Geometry Collections
|
|||
>>> mp = MultiPolygon(p1, p2)
|
||||
>>> mp = MultiPolygon([p1, p2])
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``MultiPolygon`` couldn't be
|
||||
instantiated.
|
||||
|
||||
``GeometryCollection``
|
||||
----------------------
|
||||
|
||||
|
@ -852,11 +808,6 @@ Geometry Collections
|
|||
>>> gc = GeometryCollection(Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly)
|
||||
>>> gc = GeometryCollection((Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly))
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, an empty ``GeometryCollection`` couldn't be
|
||||
instantiated.
|
||||
|
||||
.. _prepared-geometries:
|
||||
|
||||
Prepared Geometries
|
||||
|
@ -978,10 +929,6 @@ include the SRID value (in other words, EWKB).
|
|||
:attr:`WKBWriter.outdim` documentation for more details about the ``dim``
|
||||
argument.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to pass the ``dim`` argument to the constructor was added.
|
||||
|
||||
.. method:: WKBWriter.write(geom)
|
||||
|
||||
Returns the WKB of the given geometry as a Python ``buffer`` object.
|
||||
|
@ -1071,11 +1018,6 @@ include the SRID value (in other words, EWKB).
|
|||
:attr:`WKBWriter.outdim`, :attr:`trim`, and :attr:`precision` attributes for
|
||||
details about the constructor arguments.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to pass the ``dim``, ``trim``, and ``precision`` arguments
|
||||
to the constructor was added.
|
||||
|
||||
.. method:: WKTWriter.write(geom)
|
||||
|
||||
Returns the WKT of the given geometry. Example::
|
||||
|
@ -1092,8 +1034,6 @@ include the SRID value (in other words, EWKB).
|
|||
|
||||
.. attribute:: WKTWriter.trim
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
This property is used to enable or disable trimming of
|
||||
unnecessary decimals.
|
||||
|
||||
|
@ -1110,8 +1050,6 @@ include the SRID value (in other words, EWKB).
|
|||
|
||||
.. attribute:: WKTWriter.precision
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
This property controls the rounding precision of coordinates;
|
||||
if set to ``None`` rounding is disabled.
|
||||
|
||||
|
|
|
@ -66,7 +66,3 @@ Would output::
|
|||
When the ``fields`` parameter is not specified, the ``geojson`` serializer adds
|
||||
a ``pk`` key to the ``properties`` dictionary with the primary key of the
|
||||
object as the value.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``pk`` key was added to the ``properties`` dictionary.
|
||||
|
|
|
@ -7,8 +7,6 @@ Trigram similarity
|
|||
|
||||
.. fieldlookup:: trigram_similar
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``trigram_similar`` lookup allows you to perform trigram lookups,
|
||||
measuring the number of trigrams (three consecutive characters) shared, using a
|
||||
dedicated PostgreSQL extension. A trigram lookup is given an expression and
|
||||
|
|
|
@ -80,8 +80,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
|
|||
|
||||
.. class:: TrigramExtension()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Installs the ``pg_trgm`` extension.
|
||||
|
||||
``UnaccentExtension``
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
Full text search
|
||||
================
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The database functions in the ``django.contrib.postgres.search`` module ease
|
||||
the use of PostgreSQL's `full text search engine
|
||||
<https://www.postgresql.org/docs/current/static/textsearch.html>`_.
|
||||
|
@ -203,8 +201,6 @@ operation.
|
|||
|
||||
.. class:: TrigramSimilarity(expression, string, **extra)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Accepts a field name or expression, and a string or expression. Returns the
|
||||
trigram similarity between the two arguments.
|
||||
|
||||
|
@ -224,8 +220,6 @@ Usage example::
|
|||
|
||||
.. class:: TrigramDistance(expression, string, **extra)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Accepts a field name or expression, and a string or expression. Returns the
|
||||
trigram distance between the two arguments.
|
||||
|
||||
|
|
|
@ -129,8 +129,6 @@ For a full list of options, refer to the commands own help by running::
|
|||
Customizing the ignored pattern list
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The default ignored pattern list, ``['CVS', '.*', '*~']``, can be customized in
|
||||
a more persistent way than providing the ``--ignore`` command option at each
|
||||
``collectstatic`` invocation. Provide a custom :class:`~django.apps.AppConfig`
|
||||
|
@ -320,13 +318,6 @@ following requirements are met:
|
|||
* you've collected all your static files by using the
|
||||
:djadmin:`collectstatic` management command
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, you also had to use
|
||||
``{% load static from staticfiles %}`` in your template. The
|
||||
:ttag:`static` template tag (``{% load static %}``) now uses
|
||||
:mod:`django.contrib.staticfiles` if it's installed.
|
||||
|
||||
Since creating the MD5 hash can be a performance burden to your website
|
||||
during runtime, ``staticfiles`` will automatically store the mapping with
|
||||
hashed names for all processed files in a file called ``staticfiles.json``.
|
||||
|
|
|
@ -315,11 +315,6 @@ the HOST header <host-headers-virtual-hosting>` and that there aren't any
|
|||
(because XSS vulnerabilities already let an attacker do anything a CSRF
|
||||
vulnerability allows and much worse).
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Added salting to the token and started changing it with each request
|
||||
to protect against `BREACH`_ attacks.
|
||||
|
||||
.. _BREACH: http://breachattack.com/
|
||||
|
||||
Caching
|
||||
|
|
|
@ -138,8 +138,6 @@ make it part of your integration test suite.
|
|||
|
||||
.. django-admin-option:: --fail-level {CRITICAL,ERROR,WARNING,INFO,DEBUG}
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Specifies the message level that will cause the command to exit with a non-zero
|
||||
status. Default is ``ERROR``.
|
||||
|
||||
|
@ -393,11 +391,6 @@ table's lifecycle, you'll need to change the
|
|||
:attr:`~django.db.models.Options.managed` option to ``True`` (or simply remove
|
||||
it because ``True`` is its default value).
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Support for the ``table`` argument(s) to choose what tables should be
|
||||
inspected was added.
|
||||
|
||||
.. django-admin-option:: --database DATABASE
|
||||
|
||||
Specifies the database to introspect. Defaults to ``default``.
|
||||
|
@ -709,8 +702,6 @@ Makes ``makemigrations`` exit with error code 1 when no migrations are created
|
|||
|
||||
.. django-admin-option:: --check
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Makes ``makemigrations`` exit with a non-zero status when model changes without
|
||||
migrations are detected.
|
||||
|
||||
|
@ -835,11 +826,6 @@ history of migrations is created at first run of ``runserver``.
|
|||
Logging of each request and response of the server is sent to the
|
||||
:ref:`django-server-logger` logger.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, log messages were written to ``sys.stderr`` instead of
|
||||
being handled through Python logging.
|
||||
|
||||
.. django-admin-option:: --noreload
|
||||
|
||||
Disables the auto-reloader. This means any Python code changes you make while
|
||||
|
@ -962,8 +948,6 @@ variable or the ``~/.pythonrc.py`` script is read.
|
|||
|
||||
.. django-admin-option:: --command COMMAND, -c COMMAND
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Lets you pass a command as a string to execute it as Django, like so::
|
||||
|
||||
django-admin shell --command="import django; print(django.__version__)"
|
||||
|
@ -1334,15 +1318,11 @@ don't.
|
|||
|
||||
.. option:: --tag TAGS
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Runs only tests :ref:`marked with the specified tags <topics-tagging-tests>`.
|
||||
May be specified multiple times and combined with :option:`test --exclude-tag`.
|
||||
|
||||
.. option:: --exclude-tag EXCLUDE_TAGS
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Excludes tests :ref:`marked with the specified tags <topics-tagging-tests>`.
|
||||
May be specified multiple times and combined with :option:`test --tag`.
|
||||
|
||||
|
@ -1803,12 +1783,6 @@ Command options which take multiple options are passed a list::
|
|||
The return value of the ``call_command()`` function is the same as the return
|
||||
value of the ``handle()`` method of the command.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
``call_command()`` now returns the value received from the
|
||||
``command.handle()`` method. It now also accepts a command object as the
|
||||
first argument.
|
||||
|
||||
Output redirection
|
||||
==================
|
||||
|
||||
|
|
|
@ -223,10 +223,6 @@ to Python 3. To avoid unexpected differences with Python 3, Django will also
|
|||
ensure that the exception made available via ``__cause__`` has a usable
|
||||
``__traceback__`` attribute.)
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``__traceback__`` attribute described above was added.
|
||||
|
||||
.. exception:: models.ProtectedError
|
||||
|
||||
Raised to prevent deletion of referenced objects when using
|
||||
|
|
|
@ -91,8 +91,6 @@ The ``Storage`` class
|
|||
|
||||
.. method:: get_accessed_time(name)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns a :class:`~datetime.datetime` of the last accessed time of the
|
||||
file. For storage systems unable to return the last accessed time this
|
||||
will raise :exc:`NotImplementedError`.
|
||||
|
@ -117,8 +115,6 @@ The ``Storage`` class
|
|||
|
||||
.. method:: get_created_time(name)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns a :class:`~datetime.datetime` of the creation time of the file.
|
||||
For storage systems unable to return the creation time this will raise
|
||||
:exc:`NotImplementedError`.
|
||||
|
@ -128,8 +124,6 @@ The ``Storage`` class
|
|||
|
||||
.. method:: get_modified_time(name)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns a :class:`~datetime.datetime` of the last modified time of the
|
||||
file. For storage systems unable to return the last modified time this
|
||||
will raise :exc:`NotImplementedError`.
|
||||
|
@ -144,8 +138,6 @@ The ``Storage`` class
|
|||
|
||||
.. method:: generate_filename(filename)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Validates the ``filename`` by calling :attr:`get_valid_name()` and
|
||||
returns a filename to be passed to the :meth:`save` method.
|
||||
|
||||
|
|
|
@ -711,8 +711,6 @@ using the ``label_suffix`` parameter to
|
|||
|
||||
.. attribute:: Form.use_required_attribute
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
When set to ``True`` (the default), required form fields will have the
|
||||
``required`` HTML attribute.
|
||||
|
||||
|
|
|
@ -291,8 +291,6 @@ foundation for custom widgets.
|
|||
|
||||
.. method:: value_omitted_from_data(data, files, name)
|
||||
|
||||
.. versionadded:: 1.10.2
|
||||
|
||||
Given ``data`` and ``files`` dictionaries and this widget's name,
|
||||
returns whether or not there's data or files for the widget.
|
||||
|
||||
|
@ -307,8 +305,6 @@ foundation for custom widgets.
|
|||
|
||||
.. method:: use_required_attribute(initial)
|
||||
|
||||
.. versionadded:: 1.10.1
|
||||
|
||||
Given a form field's ``initial`` value, returns whether or not the
|
||||
widget can be rendered with the ``required`` HTML attribute. Forms use
|
||||
this method along with :attr:`Field.required
|
||||
|
|
|
@ -97,8 +97,6 @@ Exception middleware
|
|||
|
||||
.. class:: ExceptionMiddleware
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Catches exceptions raised during the request/response cycle and returns the
|
||||
appropriate response.
|
||||
|
||||
|
@ -161,12 +159,6 @@ If the response has an ``ETag`` header, the ETag is made weak to comply with
|
|||
You can apply GZip compression to individual views using the
|
||||
:func:`~django.views.decorators.gzip.gzip_page()` decorator.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, Django's CSRF protection mechanism was vulnerable to
|
||||
BREACH attacks when compression was used. This is no longer the case, but
|
||||
you should still take care not to compromise your own secrets this way.
|
||||
|
||||
Conditional GET middleware
|
||||
--------------------------
|
||||
|
||||
|
|
|
@ -281,10 +281,6 @@ be removed (elided) when :ref:`squashing migrations <migration-squashing>`.
|
|||
|
||||
.. _sqlparse: https://pypi.python.org/pypi/sqlparse
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``elidable`` argument was added.
|
||||
|
||||
``RunPython``
|
||||
-------------
|
||||
|
||||
|
@ -400,15 +396,6 @@ if ``atomic=True`` is passed to the ``RunPython`` operation.
|
|||
you want the operation not to do anything in the given direction. This is
|
||||
especially useful in making the operation reversible.
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``elidable`` argument was added.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``atomic`` argument default was changed to ``None``, indicating that
|
||||
the atomicity is controlled by the ``atomic`` attribute of the migration.
|
||||
|
||||
``SeparateDatabaseAndState``
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ allows the field to have two "empty values", but it's important for the
|
|||
|
||||
.. class:: Cast(expression, output_field)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Forces the result type of ``expression`` to be the one from ``output_field``.
|
||||
|
||||
Usage example::
|
||||
|
@ -281,8 +279,6 @@ Date Functions
|
|||
|
||||
.. module:: django.db.models.functions.datetime
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
We'll be using the following model in examples of each function::
|
||||
|
||||
class Experiment(models.Model):
|
||||
|
|
|
@ -278,8 +278,6 @@ The ``Func`` API is as follows:
|
|||
|
||||
.. attribute:: arity
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A class attribute that denotes the number of arguments the function
|
||||
accepts. If this attribute is set and the function is called with a
|
||||
different number of expressions, ``TypeError`` will be raised. Defaults
|
||||
|
@ -308,11 +306,6 @@ The ``Func`` API is as follows:
|
|||
template="%(function)s('', %(expressions)s)",
|
||||
)
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Support for the ``arg_joiner`` and ``**extra_context`` parameters
|
||||
was added.
|
||||
|
||||
The ``*expressions`` argument is a list of positional expressions that the
|
||||
function will be applied to. The expressions will be converted to strings,
|
||||
joined together with ``arg_joiner``, and then interpolated into the ``template``
|
||||
|
|
|
@ -401,8 +401,6 @@ otherwise. See :ref:`automatic-primary-key-fields`.
|
|||
|
||||
.. class:: BigAutoField(**options)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A 64-bit integer, much like an :class:`AutoField` except that it is
|
||||
guaranteed to fit numbers from ``1`` to ``9223372036854775807``.
|
||||
|
||||
|
@ -1777,8 +1775,6 @@ Field API reference
|
|||
|
||||
.. method:: rel_db_type(connection)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Returns the database column data type for fields such as ``ForeignKey``
|
||||
and ``OneToOneField`` that point to the :class:`Field`, taking
|
||||
into account the ``connection``.
|
||||
|
|
|
@ -119,12 +119,6 @@ The example above shows a full ``from_db()`` implementation to clarify how that
|
|||
is done. In this case it would of course be possible to just use ``super()`` call
|
||||
in the ``from_db()`` method.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, you could check if all fields were loaded by consulting
|
||||
``cls._deferred``. This attribute is removed and
|
||||
``django.db.models.DEFERRED`` is new.
|
||||
|
||||
Refreshing objects from database
|
||||
================================
|
||||
|
||||
|
@ -135,11 +129,6 @@ value from the database::
|
|||
>>> del obj.field
|
||||
>>> obj.field # Loads the field from the database
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, accessing a deleted field raised ``AttributeError``
|
||||
instead of reloading it.
|
||||
|
||||
.. method:: Model.refresh_from_db(using=None, fields=None)
|
||||
|
||||
If you need to reload a model's values from the database, you can use the
|
||||
|
|
|
@ -38,8 +38,6 @@ Available ``Meta`` options
|
|||
|
||||
.. attribute:: Options.base_manager_name
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The name of the manager to use for the model's
|
||||
:attr:`~django.db.models.Model._base_manager`.
|
||||
|
||||
|
@ -108,8 +106,6 @@ Django quotes column and table names behind the scenes.
|
|||
|
||||
.. attribute:: Options.default_manager_name
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The name of the manager to use for the model's
|
||||
:attr:`~django.db.models.Model._default_manager`.
|
||||
|
||||
|
|
|
@ -1949,11 +1949,6 @@ This has a number of caveats though:
|
|||
unless the database backend supports it (currently PostgreSQL).
|
||||
* It does not work with many-to-many relationships.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Support for setting primary keys on objects created using ``bulk_create()``
|
||||
when using PostgreSQL was added.
|
||||
|
||||
The ``batch_size`` parameter controls how many objects are created in single
|
||||
query. The default is to create all objects in one batch, except for SQLite
|
||||
where the default is such that at most 999 variables per query are used.
|
||||
|
@ -2011,10 +2006,6 @@ Example::
|
|||
|
||||
If you pass ``in_bulk()`` an empty list, you'll get an empty dictionary.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, ``id_list`` was a required argument.
|
||||
|
||||
``iterator()``
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -3206,8 +3197,6 @@ attribute:
|
|||
|
||||
.. function:: prefetch_related_objects(model_instances, *related_lookups)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Prefetches the given lookups on an iterable of model instances. This is useful
|
||||
in code that receives a list of model instances as opposed to a ``QuerySet``;
|
||||
for example, when fetching models from a cache or instantiating them manually.
|
||||
|
|
|
@ -86,15 +86,11 @@ All attributes should be considered read-only, unless stated otherwise.
|
|||
|
||||
.. attribute:: HttpRequest.content_type
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A string representing the MIME type of the request, parsed from the
|
||||
``CONTENT_TYPE`` header.
|
||||
|
||||
.. attribute:: HttpRequest.content_params
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A dictionary of key/value parameters included in the ``CONTENT_TYPE``
|
||||
header.
|
||||
|
||||
|
@ -639,11 +635,6 @@ generators are immediately closed.
|
|||
If you need the response to be streamed from the iterator to the client, you
|
||||
must use the :class:`StreamingHttpResponse` class instead.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Objects with a ``close()`` method used to be closed when the WSGI server
|
||||
called ``close()`` on the response.
|
||||
|
||||
Setting header fields
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -846,15 +837,11 @@ Methods
|
|||
|
||||
.. method:: HttpResponse.readable()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Always ``False``. This method makes an :class:`HttpResponse` instance a
|
||||
stream-like object.
|
||||
|
||||
.. method:: HttpResponse.seekable()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Always ``False``. This method makes an :class:`HttpResponse` instance a
|
||||
stream-like object.
|
||||
|
||||
|
|
|
@ -423,11 +423,6 @@ an :class:`~django.http.HttpResponseForbidden`.
|
|||
parameter that defaults to ``'403_csrf.html'``. If a template with that name
|
||||
exists, it will be used to render the page.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``template_name`` parameter and the behavior of searching for a template
|
||||
called ``403_csrf.html`` were added to ``csrf_failure()``.
|
||||
|
||||
.. setting:: CSRF_HEADER_NAME
|
||||
|
||||
``CSRF_HEADER_NAME``
|
||||
|
@ -906,8 +901,6 @@ The maximum size that the DATAFILE_TMP is allowed to grow to.
|
|||
DATA_UPLOAD_MAX_MEMORY_SIZE
|
||||
---------------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Default: ``2621440`` (i.e. 2.5 MB).
|
||||
|
||||
The maximum size in bytes that a request body may be before a
|
||||
|
@ -930,8 +923,6 @@ See also :setting:`FILE_UPLOAD_MAX_MEMORY_SIZE`.
|
|||
DATA_UPLOAD_MAX_NUMBER_FIELDS
|
||||
-----------------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Default: ``1000``
|
||||
|
||||
The maximum number of parameters that may be received via GET or POST before a
|
||||
|
@ -1513,10 +1504,6 @@ of the preferred value or not supplied at all. It is also used by
|
|||
request/response cycle (e.g. in management commands and standalone scripts) to
|
||||
generate correct URLs when ``SCRIPT_NAME`` is not ``/``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The setting's use in :func:`django.setup()` was added.
|
||||
|
||||
.. setting:: FORM_RENDERER
|
||||
|
||||
``FORM_RENDERER``
|
||||
|
@ -1894,8 +1881,6 @@ Example: ``"http://media.example.com/"``
|
|||
``MIDDLEWARE``
|
||||
--------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Default:: ``None``
|
||||
|
||||
A list of middleware to use. See :doc:`/topics/http/middleware`.
|
||||
|
@ -2775,8 +2760,6 @@ the URL in two places (``settings`` and URLconf).
|
|||
``LOGOUT_REDIRECT_URL``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Default: ``None``
|
||||
|
||||
The URL where requests are redirected after a user logs out using
|
||||
|
@ -2817,22 +2800,6 @@ Default::
|
|||
'django.contrib.auth.hashers.BCryptPasswordHasher',
|
||||
]
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The following hashers were removed from the defaults::
|
||||
|
||||
'django.contrib.auth.hashers.SHA1PasswordHasher'
|
||||
'django.contrib.auth.hashers.MD5PasswordHasher'
|
||||
'django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher'
|
||||
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher'
|
||||
'django.contrib.auth.hashers.CryptPasswordHasher'
|
||||
|
||||
Consider using a :ref:`wrapped password hasher <wrapping-password-hashers>`
|
||||
to strengthen the hashes in your database. If that's not feasible, add this
|
||||
setting to your project and add back any hashers that you need.
|
||||
|
||||
Also, the ``Argon2PasswordHasher`` was added.
|
||||
|
||||
.. setting:: AUTH_PASSWORD_VALIDATORS
|
||||
|
||||
``AUTH_PASSWORD_VALIDATORS``
|
||||
|
|
|
@ -407,8 +407,6 @@ Arguments sent with this signal:
|
|||
The alias of database on which a command will operate.
|
||||
|
||||
``plan``
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The migration plan that is going to be used for the migration run. While
|
||||
the plan is not public API, this allows for the rare cases when it is
|
||||
necessary to know the plan. A plan is a list of two-tuples with the first
|
||||
|
@ -416,8 +414,6 @@ Arguments sent with this signal:
|
|||
if the migration was rolled back (``True``) or applied (``False``).
|
||||
|
||||
``apps``
|
||||
.. versionadded:: 1.10
|
||||
|
||||
An instance of :data:`Apps <django.apps>` containing the state of the
|
||||
project before the migration run. It should be used instead of the global
|
||||
:attr:`apps <django.apps.apps>` registry to retrieve the models you
|
||||
|
@ -466,8 +462,6 @@ Arguments sent with this signal:
|
|||
database.
|
||||
|
||||
``plan``
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The migration plan that was used for the migration run. While the plan is
|
||||
not public API, this allows for the rare cases when it is necessary to
|
||||
know the plan. A plan is a list of two-tuples with the first item being
|
||||
|
@ -475,8 +469,6 @@ Arguments sent with this signal:
|
|||
migration was rolled back (``True``) or applied (``False``).
|
||||
|
||||
``apps``
|
||||
.. versionadded:: 1.10
|
||||
|
||||
An instance of :data:`Apps <django.apps.apps>` containing the state of the
|
||||
project after the migration run. It should be used instead of the global
|
||||
:attr:`apps <django.apps.apps>` registry to retrieve the models you
|
||||
|
|
|
@ -71,10 +71,6 @@ what's passed by :class:`~django.template.backends.django.DjangoTemplates`.
|
|||
|
||||
Only set it to ``False`` if you're rendering non-HTML templates!
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``autoescape`` option was added.
|
||||
|
||||
* ``context_processors`` is a list of dotted Python paths to callables
|
||||
that are used to populate the context when a template is rendered with a
|
||||
request. These callables take a request object as their argument and
|
||||
|
@ -700,11 +696,6 @@ the request's IP address (``request.META['REMOTE_ADDR']``) is in the
|
|||
and how long it took. The list is in order by database alias and then by
|
||||
query. It's lazily generated on access.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, only the queries for the default database alias were
|
||||
included.
|
||||
|
||||
``django.template.context_processors.i18n``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -231,10 +231,6 @@ In ``template.html``, the following paths would be valid::
|
|||
{% extends "../base1.html" %}
|
||||
{% extends "./my/base3.html" %}
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ability to use relative paths was added.
|
||||
|
||||
.. templatetag:: filter
|
||||
|
||||
``filter``
|
||||
|
@ -538,8 +534,6 @@ Not contained within. This is the negation of the ``in`` operator.
|
|||
``is`` operator
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Object identity. Tests if two values are the same object. Example::
|
||||
|
||||
{% if somevar is True %}
|
||||
|
@ -553,8 +547,6 @@ Object identity. Tests if two values are the same object. Example::
|
|||
``is not`` operator
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Negated object identity. Tests if two values are not the same object. This is
|
||||
the negation of the ``is`` operator. Example::
|
||||
|
||||
|
@ -685,10 +677,6 @@ This example includes the contents of the template ``"foo/bar.html"``::
|
|||
A string argument may be a relative path starting with ``./`` or ``../`` as
|
||||
described in the :ttag:`extends` tag.
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ability to use a relative path was added.
|
||||
|
||||
This example includes the contents of the template whose name is contained in
|
||||
the variable ``template_name``::
|
||||
|
||||
|
@ -1597,10 +1585,6 @@ produce empty output::
|
|||
|
||||
{{ values|dictsort:"0" }}
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to order a list of lists was added.
|
||||
|
||||
.. templatefilter:: dictsortreversed
|
||||
|
||||
``dictsortreversed``
|
||||
|
@ -2585,12 +2569,6 @@ slightly different call::
|
|||
See :class:`~django.template.backends.jinja2.Jinja2` for information on
|
||||
using the ``static`` tag with Jinja2.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, you had to use ``{% load static from staticfiles %}`` in
|
||||
your template to serve files from the storage defined in
|
||||
:setting:`STATICFILES_STORAGE`. This is no longer required.
|
||||
|
||||
.. templatetag:: get_static_prefix
|
||||
|
||||
``get_static_prefix``
|
||||
|
|
|
@ -520,8 +520,6 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
|
|||
|
||||
.. function:: keep_lazy(func, *resultclasses)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Django offers many utility functions (particularly in ``django.utils``)
|
||||
that take a string as their first argument and do something to that string.
|
||||
These functions are used by template filters as well as directly in other
|
||||
|
@ -565,8 +563,6 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
|
|||
|
||||
.. function:: keep_lazy_text(func)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A shortcut for ``keep_lazy(six.text_type)(func)``.
|
||||
|
||||
If you have a function that returns text and you want to be able to take
|
||||
|
|
|
@ -230,10 +230,6 @@ to, or in lieu of custom ``field.clean()`` methods.
|
|||
of integers separated by ``sep``. It allows negative integers when
|
||||
``allow_negative`` is ``True``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ``allow_negative`` parameter was added.
|
||||
|
||||
``MaxValueValidator``
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -87,10 +87,6 @@ Three things to note about 404 views:
|
|||
your 404 view will never be used, and your URLconf will be displayed
|
||||
instead, with some debug information.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``.
|
||||
|
||||
.. _http_internal_server_error_view:
|
||||
|
||||
The 500 (server error) view
|
||||
|
@ -111,10 +107,6 @@ If :setting:`DEBUG` is set to ``True`` (in your settings module), then
|
|||
your 500 view will never be used, and the traceback will be displayed
|
||||
instead, with some debug information.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``.
|
||||
|
||||
.. _http_forbidden_view:
|
||||
|
||||
The 403 (HTTP Forbidden) view
|
||||
|
@ -143,10 +135,6 @@ view you can use code like this::
|
|||
raise PermissionDenied
|
||||
# ...
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``.
|
||||
|
||||
.. _http_bad_request_view:
|
||||
|
||||
The 400 (bad request) view
|
||||
|
@ -167,7 +155,3 @@ context, as the exception message might contain sensitive information like
|
|||
filesystem paths.
|
||||
|
||||
``bad_request`` views are also only used when :setting:`DEBUG` is ``False``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``.
|
||||
|
|
|
@ -260,11 +260,6 @@ authenticated users do not.
|
|||
Do not forget to test for the ``is_active`` attribute of the user in your own
|
||||
backend permission methods.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, the :class:`~django.contrib.auth.backends.ModelBackend`
|
||||
allowed inactive users to authenticate.
|
||||
|
||||
Handling object permissions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -661,8 +656,6 @@ The following attributes and methods are available on any subclass of
|
|||
|
||||
.. method:: clean()
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Normalizes the username by calling :meth:`normalize_username`. If you
|
||||
override this method, be sure to call ``super()`` to retain the
|
||||
normalization.
|
||||
|
@ -677,8 +670,6 @@ The following attributes and methods are available on any subclass of
|
|||
|
||||
.. classmethod:: normalize_username(username)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Applies NFKC Unicode normalization to usernames so that visually
|
||||
identical characters with different Unicode code points are considered
|
||||
identical.
|
||||
|
|
|
@ -358,14 +358,6 @@ If you have an authenticated user you want to attach to the current session
|
|||
# Return an 'invalid login' error message.
|
||||
...
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, when you're manually logging a user in, you *must*
|
||||
successfully authenticate the user with
|
||||
:func:`~django.contrib.auth.authenticate()` before you call
|
||||
:func:`~django.contrib.auth.login()`. Now you can set the backend using
|
||||
the new ``backend`` argument.
|
||||
|
||||
Selecting the authentication backend
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -956,10 +948,6 @@ implementation details see :ref:`using-the-views`.
|
|||
The optional arguments of this view are similar to the class-based
|
||||
``LoginView`` attributes.
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``redirect_authenticated_user`` parameter was added.
|
||||
|
||||
.. class:: LoginView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
|
|
@ -76,8 +76,6 @@ to modify this setting.
|
|||
Using Argon2 with Django
|
||||
------------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Argon2_ is the winner of the 2015 `Password Hashing Competition`_, a community
|
||||
organized open competition to select a next generation hashing algorithm. It's
|
||||
designed not to be easier to compute on custom hardware than it is to compute
|
||||
|
|
|
@ -133,10 +133,6 @@ perform any extra checks you need, and append any messages to those generated
|
|||
by the base class. It's recommended that you delegate each check to separate
|
||||
methods.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Database backend checks were added.
|
||||
|
||||
Consider an example where you are implementing a custom field named
|
||||
``RangedIntegerField``. This field adds ``min`` and ``max`` arguments to the
|
||||
constructor of ``IntegerField``. You may want to add a check to ensure that users
|
||||
|
|
|
@ -367,13 +367,6 @@ Here's how Django handles custom managers and :ref:`model inheritance
|
|||
<django.db.models.Options.default_manager_name>`, or the first manager
|
||||
declared on the model, or the default manager of the first parent model.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, manager inheritance varied depending on the type of
|
||||
model inheritance (i.e. :ref:`abstract-base-classes`,
|
||||
:ref:`multi-table-inheritance`, or :ref:`proxy-models`), especially
|
||||
with regards to electing the default manager.
|
||||
|
||||
These rules provide the necessary flexibility if you want to install a
|
||||
collection of custom managers on a group of models, via an abstract base
|
||||
class, but still customize the default manager. For example, suppose you have
|
||||
|
|
|
@ -1034,11 +1034,6 @@ attribute was omitted, the reverse name for the ``m2m`` field would be
|
|||
``childa_set`` in the ``ChildA`` case and ``childb_set`` for the ``ChildB``
|
||||
field.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` for
|
||||
``related_query_name`` was added.
|
||||
|
||||
.. _multi-table-inheritance:
|
||||
|
||||
Multi-table inheritance
|
||||
|
@ -1236,11 +1231,6 @@ proxy model can inherit from any number of abstract model classes, providing
|
|||
they do *not* define any model fields. A proxy model may also inherit from any
|
||||
number of proxy models that share a common non-abstract parent class.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In earlier versions, a proxy model couldn't inherit more than one proxy
|
||||
model that shared the same parent class.
|
||||
|
||||
Proxy model managers
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -1374,10 +1364,6 @@ This restriction doesn't apply to model fields inherited from an abstract
|
|||
model. Such fields may be overridden with another field or value, or be removed
|
||||
by setting ``field_name = None``.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The ability to override abstract fields was added.
|
||||
|
||||
.. warning::
|
||||
|
||||
Model managers are inherited from abstract base classes. Overriding an
|
||||
|
|
|
@ -109,11 +109,6 @@ creating new migrations. By default, it checks only the ``default`` database,
|
|||
but it consults the :meth:`allow_migrate` method of :ref:`routers
|
||||
<topics-db-multi-db-routing>` if any are installed.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Migration consistency checks were added. Checks based on database routers
|
||||
were added in 1.10.1.
|
||||
|
||||
.. _topics-db-multi-db-routing:
|
||||
|
||||
Automatic database routing
|
||||
|
|
|
@ -249,10 +249,6 @@ Or if :mod:`~django.contrib.staticfiles` is configured using the
|
|||
<script type="text/javascript" src="https://static.example.com/animations.27e20196a850.js"></script>
|
||||
<script type="text/javascript" src="http://othersite.com/actions.js"></script>
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Older versions didn't serve assets using :mod:`django.contrib.staticfiles`.
|
||||
|
||||
``Media`` objects
|
||||
=================
|
||||
|
||||
|
|
|
@ -342,16 +342,6 @@ there is one, for that field. This behavior doesn't apply to fields that use
|
|||
form submission. Use a custom form field or widget if you're designing an API
|
||||
and want the default fallback for a :class:`~django.db.models.BooleanField`.
|
||||
|
||||
.. versionchanged:: 1.10.1
|
||||
|
||||
Older versions don't have the exception for
|
||||
:class:`~django.forms.CheckboxInput` which means that unchecked checkboxes
|
||||
receive a value of ``True`` if that's the model field default.
|
||||
|
||||
.. versionchanged:: 1.10.2
|
||||
|
||||
The :meth:`~django.forms.Widget.value_omitted_from_data` method was added.
|
||||
|
||||
This ``save()`` method accepts an optional ``commit`` keyword argument, which
|
||||
accepts either ``True`` or ``False``. If you call ``save()`` with
|
||||
``commit=False``, then it will return an object that hasn't yet been saved to
|
||||
|
|
|
@ -86,15 +86,6 @@ caveats:
|
|||
* Unlike the ``__call__()`` method which is called once per request,
|
||||
``__init__()`` is called only *once*, when the Web server starts.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older versions, ``__init__()`` wasn't called until the Web server
|
||||
responded to its first request.
|
||||
|
||||
In older versions, ``__init__()`` didn't accept any arguments. To allow
|
||||
your middleware to be used in Django 1.9 and earlier, make ``get_response``
|
||||
an optional argument (``get_response=None``).
|
||||
|
||||
Marking middleware as unused
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -988,8 +988,6 @@ The ``JavaScriptCatalog`` view
|
|||
|
||||
.. module:: django.views.i18n
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
.. class:: JavaScriptCatalog
|
||||
|
||||
A view that produces a JavaScript code library with functions that mimic
|
||||
|
@ -1216,8 +1214,6 @@ will render a conditional expression. This will evaluate to either a ``true``
|
|||
The ``JSONCatalog`` view
|
||||
------------------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
.. class:: JSONCatalog
|
||||
|
||||
In order to use another client-side library to handle translations, you may
|
||||
|
@ -1379,22 +1375,12 @@ will be::
|
|||
>>> reverse('news:index')
|
||||
'/nl/news/'
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``prefix_default_language`` parameter was added.
|
||||
|
||||
.. warning::
|
||||
|
||||
:func:`~django.conf.urls.i18n.i18n_patterns` is only allowed in a root
|
||||
URLconf. Using it within an included URLconf will throw an
|
||||
:exc:`~django.core.exceptions.ImproperlyConfigured` exception.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In older version, using ``i18n_patterns`` in a root URLconf different from
|
||||
:setting:`ROOT_URLCONF` by setting :attr:`request.urlconf
|
||||
<django.http.HttpRequest.urlconf>` wasn't supported.
|
||||
|
||||
.. warning::
|
||||
|
||||
Ensure that you don't have non-prefixed URL patterns that might collide
|
||||
|
@ -1814,11 +1800,6 @@ set, to ``/``, depending on the nature of the request:
|
|||
parameter was set. Otherwise a 204 status code (No Content) will be returned.
|
||||
* For non-AJAX requests, the fallback will always be performed.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Returning a 204 status code for AJAX requests when no redirect is specified
|
||||
is new.
|
||||
|
||||
Here's example HTML template code:
|
||||
|
||||
.. code-block:: html+django
|
||||
|
|
|
@ -481,8 +481,6 @@ Messages to this logger have the following extra context:
|
|||
``django.server``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
Log messages related to the handling of requests received by the server invoked
|
||||
by the :djadmin:`runserver` command. HTTP 5XX responses are logged as ``ERROR``
|
||||
messages, 4XX responses are logged as ``WARNING`` messages, and everything else
|
||||
|
@ -584,10 +582,6 @@ Messages to this logger have ``params`` and ``sql`` in their extra context (but
|
|||
unlike ``django.db.backends``, not duration). The values have the same meaning
|
||||
as explained in :ref:`django-db-logger`.
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``extra`` context was added.
|
||||
|
||||
Handlers
|
||||
--------
|
||||
|
||||
|
|
|
@ -314,11 +314,6 @@ new migrations until it's fixed. When using multiple databases, you can use the
|
|||
<topics-db-multi-db-routing>` to control which databases
|
||||
:djadmin:`makemigrations` checks for consistent history.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Migration consistency checks were added. Checks based on database routers
|
||||
were added in 1.10.1.
|
||||
|
||||
Adding migrations to apps
|
||||
=========================
|
||||
|
||||
|
@ -679,10 +674,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.10
|
||||
|
||||
Serialization support for ``enum.Enum`` was added.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Serialization support for ``uuid.UUID`` was added.
|
||||
|
|
|
@ -305,10 +305,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.10
|
||||
|
||||
Support for ``Promise`` was added.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Support for :class:`~datetime.timedelta` was added.
|
||||
|
|
|
@ -308,10 +308,6 @@ applications. This generic name was kept for backwards-compatibility.
|
|||
|
||||
Only set it to ``False`` if you're rendering non-HTML templates!
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
The ``autoescape`` option was added.
|
||||
|
||||
* ``'context_processors'``: a list of dotted Python paths to callables that
|
||||
are used to populate the context when a template is rendered with a request.
|
||||
These callables take a request object as their argument and return a
|
||||
|
|
|
@ -371,12 +371,6 @@ Use the ``django.test.Client`` class to make requests.
|
|||
:meth:`~django.contrib.auth.models.UserManager.create_user` helper
|
||||
method to create a new user with a correctly hashed password.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
In previous versions, inactive users (:attr:`is_active=False
|
||||
<django.contrib.auth.models.User.is_active>`) were not permitted
|
||||
to login.
|
||||
|
||||
.. method:: Client.force_login(user, backend=None)
|
||||
|
||||
If your site uses Django's :doc:`authentication
|
||||
|
@ -795,11 +789,6 @@ The class:
|
|||
|
||||
* Checks deferrable database constraints at the end of each test.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
The check for deferrable database constraints at the end of each test was
|
||||
added.
|
||||
|
||||
It also provides an additional method:
|
||||
|
||||
.. classmethod:: TestCase.setUpTestData()
|
||||
|
@ -1604,8 +1593,6 @@ your test suite.
|
|||
Tagging tests
|
||||
-------------
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
You can tag your tests so you can easily run a particular subset. For example,
|
||||
you might label fast or slow tests::
|
||||
|
||||
|
|
Loading…
Reference in New Issue