mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Removed versionadded/changed annotations for 1.9.
This commit is contained in:
parent
1915a7e5c5
commit
46a38307c2
67 changed files with 15 additions and 731 deletions
|
@ -114,8 +114,6 @@ Usage example::
|
|||
|
||||
.. class:: Greatest(*expressions, **extra)
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Accepts a list of at least two field names or expressions and returns the
|
||||
greatest value. Each argument must be of a similar type, so mixing text and
|
||||
numbers will result in a database error.
|
||||
|
@ -158,8 +156,6 @@ and ``comment.modified``.
|
|||
|
||||
.. class:: Least(*expressions, **extra)
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Accepts a list of at least two field names or expressions and returns the
|
||||
least value. Each argument must be of a similar type, so mixing text and numbers
|
||||
will result in a database error.
|
||||
|
@ -204,10 +200,6 @@ It can also be registered as a transform. For example::
|
|||
>>> # Get authors whose name is longer than 7 characters
|
||||
>>> authors = Author.objects.filter(name__length__gt=7)
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ability to register the function as a transform was added.
|
||||
|
||||
``Lower``
|
||||
=========
|
||||
|
||||
|
@ -226,17 +218,11 @@ Usage example::
|
|||
>>> print(author.name_lower)
|
||||
margaret smith
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ability to register the function as a transform was added.
|
||||
|
||||
``Now``
|
||||
=======
|
||||
|
||||
.. class:: Now()
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Returns the database server's current date and time when the query is executed,
|
||||
typically using the SQL ``CURRENT_TIMESTAMP``.
|
||||
|
||||
|
@ -290,10 +276,6 @@ Usage example::
|
|||
>>> print(author.name_upper)
|
||||
MARGARET SMITH
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ability to register the function as a transform was added.
|
||||
|
||||
Date Functions
|
||||
==============
|
||||
|
||||
|
|
|
@ -10,10 +10,6 @@ number of built-in expressions (documented below) that can be used to help you
|
|||
write queries. Expressions can be combined, or in some cases nested, to form
|
||||
more complex computations.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Support for using expressions when creating new model instances was added.
|
||||
|
||||
Supported arithmetic
|
||||
====================
|
||||
|
||||
|
|
|
@ -1064,8 +1064,6 @@ of some other value. You can do this automatically in the admin using
|
|||
|
||||
.. attribute:: SlugField.allow_unicode
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
If ``True``, the field accepts Unicode letters in addition to ASCII
|
||||
letters. Defaults to ``False``.
|
||||
|
||||
|
@ -1165,12 +1163,6 @@ Django also defines a set of fields that represent relations.
|
|||
A many-to-one relationship. Requires a positional argument: the class to which
|
||||
the model is related.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
``on_delete`` can now be used as the second positional argument (previously
|
||||
it was typically only passed as a keyword argument). It will be a required
|
||||
argument in Django 2.0.
|
||||
|
||||
.. _recursive-relationships:
|
||||
|
||||
To create a recursive relationship -- an object that has a many-to-one
|
||||
|
@ -1672,12 +1664,6 @@ A one-to-one relationship. Conceptually, this is similar to a
|
|||
:class:`ForeignKey` with :attr:`unique=True <Field.unique>`, but the
|
||||
"reverse" side of the relation will directly return a single object.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
``on_delete`` can now be used as the second positional argument (previously
|
||||
it was typically only passed as a keyword argument). It will be a required
|
||||
argument in Django 2.0.
|
||||
|
||||
This is most useful as the primary key of a model which "extends"
|
||||
another model in some way; :ref:`multi-table-inheritance` is
|
||||
implemented by adding an implicit one-to-one relation from the child
|
||||
|
|
|
@ -564,14 +564,6 @@ Sometimes with :ref:`multi-table inheritance <multi-table-inheritance>` you may
|
|||
want to delete only a child model's data. Specifying ``keep_parents=True`` will
|
||||
keep the parent model's data.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ``keep_parents`` parameter was added.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The return value describing the number of objects deleted was added.
|
||||
|
||||
Pickling objects
|
||||
================
|
||||
|
||||
|
|
|
@ -50,10 +50,6 @@ register lookups on itself. The two prominent examples are
|
|||
the same name. ``lookup_name`` will be used for this lookup if
|
||||
provided, otherwise ``lookup.lookup_name`` will be used.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ``lookup_name`` parameter was added.
|
||||
|
||||
.. method:: get_lookup(lookup_name)
|
||||
|
||||
Returns the :class:`Lookup` named ``lookup_name`` registered in the class.
|
||||
|
@ -140,10 +136,6 @@ following methods:
|
|||
one argument. It can also be used on the right hand side of a filter or
|
||||
directly as an annotation.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
``Transform`` is now a subclass of ``Func``.
|
||||
|
||||
.. attribute:: bilateral
|
||||
|
||||
A boolean indicating whether this transformation should apply to both
|
||||
|
|
|
@ -29,8 +29,6 @@ Available ``Meta`` options
|
|||
|
||||
app_label = 'myapp'
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
If you want to represent a model with the format ``app_label.object_name``
|
||||
or ``app_label.model_name`` you can use ``model._meta.label``
|
||||
or ``model._meta.label_lower`` respectively.
|
||||
|
@ -352,8 +350,6 @@ The name of the manager to use for the model's
|
|||
|
||||
.. attribute:: Options.required_db_features
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
List of database features that the current connection should have so that
|
||||
the model is considered during the migration phase. For example, if you set
|
||||
this list to ``['gis_enabled']``, the model will only be synchronized on
|
||||
|
@ -366,8 +362,6 @@ The name of the manager to use for the model's
|
|||
|
||||
.. attribute:: Options.required_db_vendor
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Name of a supported database vendor that this model is specific to. Current
|
||||
built-in vendor names are: ``sqlite``, ``postgresql``, ``mysql``,
|
||||
``oracle``. If this attribute is not empty and the current connection vendor
|
||||
|
@ -471,8 +465,6 @@ Read-only ``Meta`` attributes
|
|||
|
||||
.. attribute:: Options.label
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Representation of the object, returns ``app_label.object_name``, e.g.
|
||||
``'polls.Question'``.
|
||||
|
||||
|
@ -481,7 +473,5 @@ Read-only ``Meta`` attributes
|
|||
|
||||
.. attribute:: Options.label_lower
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Representation of the model, returns ``app_label.model_name``, e.g.
|
||||
``'polls.question'``.
|
||||
|
|
|
@ -1831,10 +1831,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.9
|
||||
|
||||
Support for using ``bulk_create()`` with proxy models was added.
|
||||
|
||||
.. versionchanged:: 1.10
|
||||
|
||||
Support for setting primary keys on objects created using ``bulk_create()``
|
||||
|
@ -2169,10 +2165,6 @@ For example, to delete all the entries in a particular blog::
|
|||
>>> Entry.objects.filter(blog=b).delete()
|
||||
(4, {'weblog.Entry': 2, 'weblog.Entry_authors': 2})
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The return value describing the number of objects deleted was added.
|
||||
|
||||
By default, Django's :class:`~django.db.models.ForeignKey` emulates the SQL
|
||||
constraint ``ON DELETE CASCADE`` — in other words, any objects with foreign
|
||||
keys pointing at the objects to be deleted will be deleted along with them.
|
||||
|
@ -2548,8 +2540,6 @@ numbers and even characters.
|
|||
``date``
|
||||
~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
For datetime fields, casts the value as date. Allows chaining additional field
|
||||
lookups. Takes a date value.
|
||||
|
||||
|
@ -2587,10 +2577,6 @@ SQL equivalent::
|
|||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||
current time zone before filtering.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: month
|
||||
|
||||
``month``
|
||||
|
@ -2615,10 +2601,6 @@ When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
|||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: day
|
||||
|
||||
``day``
|
||||
|
@ -2646,10 +2628,6 @@ When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
|||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: week_day
|
||||
|
||||
``week_day``
|
||||
|
@ -2677,10 +2655,6 @@ When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
|||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: hour
|
||||
|
||||
``hour``
|
||||
|
@ -2706,15 +2680,6 @@ SQL equivalent::
|
|||
For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
|
||||
to the current time zone before filtering.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Added support for :class:`~django.db.models.TimeField` on SQLite (other
|
||||
databases supported it as of 1.7).
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: minute
|
||||
|
||||
``minute``
|
||||
|
@ -2740,15 +2705,6 @@ SQL equivalent::
|
|||
For datetime fields, When :setting:`USE_TZ` is ``True``, values are converted
|
||||
to the current time zone before filtering.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Added support for :class:`~django.db.models.TimeField` on SQLite (other
|
||||
databases supported it as of 1.7).
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: second
|
||||
|
||||
``second``
|
||||
|
@ -2774,15 +2730,6 @@ SQL equivalent::
|
|||
For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
|
||||
to the current time zone before filtering.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Added support for :class:`~django.db.models.TimeField` on SQLite (other
|
||||
databases supported it as of 1.7).
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Allowed chaining additional field lookups.
|
||||
|
||||
.. fieldlookup:: isnull
|
||||
|
||||
``isnull``
|
||||
|
@ -2942,11 +2889,6 @@ by the aggregate.
|
|||
* Return type: ``float`` (or the type of whatever ``output_field`` is
|
||||
specified)
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ``output_field`` parameter was added to allow aggregating over
|
||||
non-numeric columns, such as ``DurationField``.
|
||||
|
||||
``Count``
|
||||
~~~~~~~~~
|
||||
|
||||
|
|
|
@ -62,12 +62,6 @@ Related objects reference
|
|||
some custom logic when a relationship is created, listen to the
|
||||
:data:`~django.db.models.signals.m2m_changed` signal.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
The ``bulk`` parameter was added. In older versions, foreign key
|
||||
updates were always done using ``save()``. Use ``bulk=False`` if
|
||||
you require the old behavior.
|
||||
|
||||
.. method:: create(**kwargs)
|
||||
|
||||
Creates a new object, saves it and puts it in the related object set.
|
||||
|
@ -147,8 +141,6 @@ Related objects reference
|
|||
|
||||
.. method:: set(objs, bulk=True, clear=False)
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Replace the set of related objects::
|
||||
|
||||
>>> new_list = [obj1, obj2, obj3]
|
||||
|
@ -191,12 +183,6 @@ will first disassociate any existing objects in the related set before adding
|
|||
the contents of ``new_list``. Otherwise the objects in ``new_list`` will be
|
||||
added to the existing related object set.
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
In earlier versions, direct assignment used to perform ``clear()`` followed
|
||||
by ``add()``. It now performs a ``set()`` with the keyword argument
|
||||
``clear=False``.
|
||||
|
||||
.. deprecated:: 1.10
|
||||
|
||||
Direct assignment is deprecated in favor of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue