summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorJuan Catalano <jc@streema.com>2013-03-24 22:53:48 -0700
committerClaude Paroz <claude@2xlibre.net>2013-04-20 17:18:35 +0200
commit78c842a3230f026ad678d243e5459cd6b314d99a (patch)
treea4a22465ccc10f4efcc2816d31f2a058d9e82c9c /docs/ref/models
parent1ddeeb5b8ed5b2cf28302c8aca0a2915a3cfb240 (diff)
Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/fields.txt5
-rw-r--r--docs/ref/models/instances.txt5
-rw-r--r--docs/ref/models/querysets.txt32
3 files changed, 24 insertions, 18 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 7ef251c907..d322904ec9 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -378,6 +378,7 @@ If you need to accept :attr:`~Field.null` values then use
:class:`NullBooleanField` instead.
.. versionchanged:: 1.6
+
The default value of ``BooleanField`` was changed from ``False`` to
``None`` when :attr:`Field.default` isn't defined.
@@ -956,8 +957,8 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
.. versionadded:: 1.5
-The current value of the field will be displayed as a clickable link above the
-input widget.
+ The current value of the field will be displayed as a clickable link above the
+ input widget.
Relationship fields
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 9f583c42ac..b4b162a9ea 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -297,8 +297,9 @@ follows this algorithm:
didn't update anything, Django executes an ``INSERT``.
.. versionchanged:: 1.6
- Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
- algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
+
+ Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
+ algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
The one gotcha here is that you should be careful not to specify a primary-key
value explicitly when saving new objects, if you cannot guarantee the
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 9c1337d59f..3dde0d5411 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -554,11 +554,13 @@ Returns a ``DateQuerySet`` — a ``QuerySet`` that evaluates to a list of
particular kind within the contents of the ``QuerySet``.
.. versionchanged:: 1.6
+
``dates`` used to return a list of :class:`datetime.datetime` objects.
``field`` should be the name of a ``DateField`` of your model.
.. versionchanged:: 1.6
+
``dates`` used to accept operating on a ``DateTimeField``.
``kind`` should be either ``"year"``, ``"month"`` or ``"day"``. Each
@@ -1121,11 +1123,11 @@ to ``defer()``::
.. versionchanged:: 1.5
-Some fields in a model won't be deferred, even if you ask for them. You can
-never defer the loading of the primary key. If you are using
-:meth:`select_related()` to retrieve related models, you shouldn't defer the
-loading of the field that connects from the primary model to the related
-one, doing so will result in an error.
+ Some fields in a model won't be deferred, even if you ask for them. You can
+ never defer the loading of the primary key. If you are using
+ :meth:`select_related()` to retrieve related models, you shouldn't defer the
+ loading of the field that connects from the primary model to the related
+ one, doing so will result in an error.
.. note::
@@ -1193,20 +1195,20 @@ logically::
# existing set of fields).
Entry.objects.defer("body").only("headline", "body")
-.. versionchanged:: 1.5
-
All of the cautions in the note for the :meth:`defer` documentation apply to
``only()`` as well. Use it cautiously and only after exhausting your other
-options. Also note that using :meth:`only` and omitting a field requested
-using :meth:`select_related` is an error as well.
+options.
.. versionchanged:: 1.5
-.. note::
+ Using :meth:`only` and omitting a field requested using
+ :meth:`select_related` is an error as well.
- When calling :meth:`~django.db.models.Model.save()` for instances with
- deferred fields, only the loaded fields will be saved. See
- :meth:`~django.db.models.Model.save()` for more details.
+ .. note::
+
+ When calling :meth:`~django.db.models.Model.save()` for instances with
+ deferred fields, only the loaded fields will be saved. See
+ :meth:`~django.db.models.Model.save()` for more details.
using
~~~~~
@@ -1424,6 +1426,7 @@ query. The default is to create all objects in one batch, except for SQLite
where the default is such that at maximum 999 variables per query is used.
.. versionadded:: 1.5
+
The ``batch_size`` parameter was added in version 1.5.
count
@@ -1725,7 +1728,8 @@ methods on your models. It does, however, emit the
(including cascaded deletions).
.. versionadded:: 1.5
- Allow fast-path deletion of objects
+
+ Allow fast-path deletion of objects.
Django needs to fetch objects into memory to send signals and handle cascades.
However, if there are no cascades and no signals, then Django may take a