Permalink
Browse files

Adapted uses of versionchanged/versionadded to the new form.

Refs #20104.
  • Loading branch information...
1 parent 1ddeeb5 commit 78c842a3230f026ad678d243e5459cd6b314d99a @catalanojuan catalanojuan committed with claudep Mar 25, 2013
Showing with 206 additions and 148 deletions.
  1. +1 −1 docs/_ext/djangodocs.py
  2. +1 −1 docs/howto/custom-management-commands.txt
  3. +2 −2 docs/howto/legacy-databases.txt
  4. +2 −2 docs/intro/contributing.txt
  5. +1 −0 docs/ref/class-based-views/base.txt
  6. +1 −1 docs/ref/class-based-views/generic-date-based.txt
  7. +1 −0 docs/ref/class-based-views/mixins-date-based.txt
  8. +4 −4 docs/ref/class-based-views/mixins-editing.txt
  9. +0 −1 docs/ref/class-based-views/mixins-simple.txt
  10. +1 −0 docs/ref/clickjacking.txt
  11. +6 −1 docs/ref/contrib/admin/index.txt
  12. +12 −12 docs/ref/contrib/contenttypes.txt
  13. +1 −0 docs/ref/contrib/gis/geoquerysets.txt
  14. +1 −0 docs/ref/contrib/sites.txt
  15. +1 −0 docs/ref/databases.txt
  16. +12 −7 docs/ref/django-admin.txt
  17. +1 −0 docs/ref/exceptions.txt
  18. +3 −0 docs/ref/forms/fields.txt
  19. +2 −2 docs/ref/forms/models.txt
  20. +4 −4 docs/ref/forms/validation.txt
  21. +1 −0 docs/ref/forms/widgets.txt
  22. +1 −0 docs/ref/middleware.txt
  23. +3 −2 docs/ref/models/fields.txt
  24. +3 −2 docs/ref/models/instances.txt
  25. +18 −14 docs/ref/models/querysets.txt
  26. +10 −9 docs/ref/request-response.txt
  27. +12 −11 docs/ref/settings.txt
  28. +7 −7 docs/ref/template-response.txt
  29. +1 −0 docs/ref/templates/api.txt
  30. +21 −20 docs/ref/templates/builtins.txt
  31. +14 −14 docs/ref/unicode.txt
  32. +1 −0 docs/releases/1.0.txt
  33. +3 −3 docs/topics/auth/customizing.txt
  34. +6 −4 docs/topics/auth/default.txt
  35. +1 −0 docs/topics/db/managers.txt
  36. +1 −0 docs/topics/db/multi-db.txt
  37. +2 −0 docs/topics/db/queries.txt
  38. +1 −0 docs/topics/db/sql.txt
  39. +19 −15 docs/topics/db/transactions.txt
  40. +2 −0 docs/topics/forms/formsets.txt
  41. +1 −0 docs/topics/http/middleware.txt
  42. +2 −0 docs/topics/http/sessions.txt
  43. +2 −0 docs/topics/http/shortcuts.txt
  44. +1 −0 docs/topics/i18n/translation.txt
  45. +2 −2 docs/topics/pagination.txt
  46. +6 −6 docs/topics/serialization.txt
  47. +1 −1 docs/topics/signals.txt
  48. +7 −0 docs/topics/testing/overview.txt
@@ -66,7 +66,7 @@ def run(self):
msg = """Only one argument accepted for directive '{directive_name}::'.
Comments should be provided as content,
not as an extra argument.""".format(directive_name=self.name)
- raise ValueError(msg)
+ raise self.error(msg)
env = self.state.document.settings.env
ret = []
@@ -256,7 +256,7 @@ All attributes can be set in your derived class and can be used in
.. versionadded:: 1.6
-The ``leave_locale_alone`` option was added in Django 1.6.
+ The ``leave_locale_alone`` option was added in Django 1.6.
Methods
-------
@@ -75,8 +75,8 @@ access to your precious data on a model by model basis.
.. versionchanged:: 1.6
-The behavior by which introspected models are created as unmanaged ones is new
-in Django 1.6.
+ The behavior by which introspected models are created as unmanaged ones is new
+ in Django 1.6.
Install the core Django tables
==============================
@@ -389,8 +389,8 @@ This is a new feature, so it should be documented. Add the following on line
.. 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.
For more information on writing documentation, including an explanation of what
the ``versionadded`` bit is all about, see
@@ -105,6 +105,7 @@ TemplateView
in the URL.
.. versionchanged:: 1.5
+
The context used to be populated with a ``{{ params }}`` dictionary of
the parameters captured in the URL. Now those parameters are first-level
context variables.
@@ -142,7 +142,7 @@ YearArchiveView
.. versionchanged:: 1.5
- Previously, this returned a string.
+ Previously, this returned a string.
* ``next_year``: A :class:`~datetime.date` object
representing the first day of the next year, according to
@@ -330,5 +330,6 @@ BaseDateListView
:meth:`QuerySet.dates()<django.db.models.query.QuerySet.dates>`.
.. versionchanged:: 1.5
+
The ``ordering`` parameter was added, and the default order was
changed to ascending.
@@ -206,10 +206,10 @@ ProcessFormView
.. versionadded:: 1.6
- ``success_url`` may contain dictionary string formatting, which
- will be interpolated against the object's field attributes. For
- example, you could use ``success_url="/parent/%(parent_id)s/"`` to
- redirect to a URL composed out of the ``parent_id`` field on a model.
+ ``success_url`` may contain dictionary string formatting, which
+ will be interpolated against the object's field attributes. For
+ example, you could use ``success_url="/parent/%(parent_id)s/"`` to
+ redirect to a URL composed out of the ``parent_id`` field on a model.
.. method:: get_success_url()
@@ -67,7 +67,6 @@ TemplateResponseMixin
.. attribute:: content_type
.. versionadded:: 1.5
- The ``content_type`` attribute was added.
The content type to use for the response. ``content_type`` is passed
as a keyword argument to ``response_class``. Default is ``None`` --
@@ -62,6 +62,7 @@ To set the same ``X-Frame-Options`` value for all responses in your site, put
)
.. versionchanged:: 1.6
+
This middleware is enabled in the settings file generated by
:djadmin:`startproject`.
@@ -18,6 +18,7 @@ The admin is enabled in the default project template used by
:djadmin:`startproject`.
.. versionchanged:: 1.6
+
In previous versions, the admin wasn't enabled by default.
For reference, here are the requirements:
@@ -1341,14 +1342,17 @@ templates used by the :class:`ModelAdmin` views:
return qs.filter(author=request.user)
.. versionchanged:: 1.6
+
The ``get_queryset`` method was previously named ``queryset``.
.. method:: ModelAdmin.message_user(request, message, level=messages.INFO, extra_tags='', fail_silently=False)
Sends a message to the user using the :mod:`django.contrib.messages`
backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`.
- .. versionadded:: 1.5
+ .. versionchanged:: 1.5
+
+ Keyword arguments were added in Django 1.5.
Keyword arguments allow you to change the message level, add extra CSS
tags, or fail silently if the ``contrib.messages`` framework is not
@@ -1451,6 +1455,7 @@ 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.6
+
The embedded jQuery has been upgraded from 1.4.2 to 1.9.1.
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
@@ -234,18 +234,18 @@ lookup::
.. versionadded:: 1.5
-Prior to Django 1.5,
-:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
-:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
-always returned the :class:`~django.contrib.contenttypes.models.ContentType`
-associated with the concrete model of the specified one(s). That means there
-was no way to retrieve the
-:class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
-using those methods. As of Django 1.5 you can now pass a boolean flag –
-``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
-wether or not you want to retrieve the
-:class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
-direct model.
+ Prior to Django 1.5,
+ :meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
+ :meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
+ always returned the :class:`~django.contrib.contenttypes.models.ContentType`
+ associated with the concrete model of the specified one(s). That means there
+ was no way to retrieve the
+ :class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
+ using those methods. As of Django 1.5 you can now pass a boolean flag –
+ ``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
+ wether or not you want to retrieve the
+ :class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
+ direct model.
Generic relations
=================
@@ -950,6 +950,7 @@ __ http://geohash.org/
*Availability*: PostGIS, SpatiaLite
.. versionchanged:: 1.5
+
``geojson`` support for Spatialite > 3.0 has been added.
Attaches a ``geojson`` attribute to every model in the queryset that contains the
@@ -252,6 +252,7 @@ Enabling the sites framework
============================
.. versionchanged:: 1.6
+
In previous versions, the sites framework was enabled by default.
To enable the sites framework, follow these steps:
@@ -182,6 +182,7 @@ Django supports MySQL 5.0.3 and higher.
data on all database schema. Django's ``inspectdb`` feature uses it.
.. versionchanged:: 1.5
+
The minimum version requirement of MySQL 5.0.3 was set in Django 1.5.
Django expects the database to support Unicode (UTF-8 encoding) and delegates to
@@ -98,6 +98,7 @@ Can be run as a cronjob or directly to clean out old data from the database
(only expired sessions at the moment).
.. versionchanged:: 1.5
+
:djadmin:`cleanup` is deprecated. Use :djadmin:`clearsessions` instead.
compilemessages
@@ -122,7 +123,7 @@ Example usage::
.. versionchanged:: 1.6
-Added the ability to specify multiple locales.
+ Added the ability to specify multiple locales.
createcachetable
----------------
@@ -173,6 +174,7 @@ The :djadminopt:`--all` option may be provided to display all settings, even
if they have Django's default value. Such settings are prefixed by ``"###"``.
.. versionadded:: 1.6
+
The :djadminopt:`--all` option was added.
dumpdata <appname appname appname.Model ...>
@@ -307,8 +309,8 @@ database to introspect.
.. versionchanged:: 1.6
-The behavior by which introspected models are created as unmanaged ones is new
-in Django 1.6.
+ The behavior by which introspected models are created as unmanaged ones is new
+ in Django 1.6.
loaddata <fixture fixture ...>
------------------------------
@@ -467,7 +469,7 @@ You can also use commas to separate multiple locales::
.. versionchanged:: 1.6
-Added the ability to specify multiple locales.
+ Added the ability to specify multiple locales.
.. django-admin-option:: --domain
@@ -778,8 +780,6 @@ use the ``--plain`` option, like so::
django-admin.py shell --plain
-.. versionchanged:: 1.5
-
If you would like to specify either IPython or bpython as your interpreter if
you have both installed you can specify an alternative interpreter interface
with the ``-i`` or ``--interface`` options like so:
@@ -807,9 +807,13 @@ behavior you can use the ``--no-startup`` option. e.g.::
django-admin.py shell --plain --no-startup
+.. versionadded:: 1.5
+
+ The ``--interface`` option was added in Django 1.5.
+
.. versionadded:: 1.6
-The ``--no-startup`` option was added in Django 1.6.
+ The ``--no-startup`` option was added in Django 1.6.
sql <appname appname ...>
-------------------------
@@ -1353,6 +1357,7 @@ for any other exception. If you specify ``--traceback``, ``django-admin.py``
will also output a full stack trace when a ``CommandError`` is raised.
.. versionchanged:: 1.6
+
Previously, Django didn't show a full stack trace by default for exceptions
other than ``CommandError``.
@@ -138,6 +138,7 @@ the underlying database exceptions. See :pep:`249`, the Python Database API
Specification v2.0, for further information.
.. versionchanged:: 1.6
+
Previous version of Django only wrapped ``DatabaseError`` and
``IntegrityError``.
@@ -468,6 +468,7 @@ For each field, we describe the default widget used if you don't specify
``%(limit_value)s``, which will be substituted by the appropriate limit.
.. versionchanged:: 1.6
+
Similarly, the ``max_digits``, ``max_decimal_places`` and
``max_whole_digits`` error messages may contain ``%(max)s``.
@@ -1014,10 +1015,12 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
``invalid_pk_value``
.. versionchanged:: 1.5
+
The empty and normalized values were changed to be consistently
``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
.. versionchanged:: 1.6
+
The ``invalid_choice`` message may contain ``%(value)s`` and the
``invalid_pk_value`` message may contain ``%(pk)s``, which will be
substituted by the appropriate values.
@@ -42,7 +42,7 @@ Model Form Functions
.. versionchanged:: 1.6
- The ``widgets`` and the ``validate_max`` parameters were added.
+ The ``widgets`` and the ``validate_max`` parameters were added.
.. function:: inlineformset_factory(parent_model, model, form=ModelForm, formset=BaseInlineFormSet, fk_name=None, fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None, widgets=None, validate_max=False)
@@ -57,4 +57,4 @@ Model Form Functions
.. versionchanged:: 1.6
- The ``widgets`` and the ``validate_max`` parameters were added.
+ The ``widgets`` and the ``validate_max`` parameters were added.
@@ -359,7 +359,7 @@ considering aren't valid, we must remember to remove them from the
.. versionchanged:: 1.5
-Django used to remove the ``cleaned_data`` attribute entirely if there were
-any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
-the form doesn't validate, but it contains only field values that did
-validate.
+ Django used to remove the ``cleaned_data`` attribute entirely if there were
+ any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
+ the form doesn't validate, but it contains only field values that did
+ validate.
@@ -522,6 +522,7 @@ Selector and checkbox widgets
``True`` if the checkbox should be checked for that value.
.. versionchanged:: 1.5
+
Exceptions from ``check_test`` used to be silenced by its caller,
this is no longer the case, they will propagate upwards.
@@ -206,6 +206,7 @@ Transaction middleware
.. class:: TransactionMiddleware
.. versionchanged:: 1.6
+
``TransactionMiddleware`` is deprecated. The documentation of transactions
contains :ref:`upgrade instructions <transactions-upgrading-from-1.5>`.
@@ -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
@@ -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
Oops, something went wrong. Retry.

0 comments on commit 78c842a

Please sign in to comment.