Skip to content

Commit 78c842a

Browse files
catalanojuanclaudep
authored andcommitted
Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
1 parent 1ddeeb5 commit 78c842a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+206
-148
lines changed

docs/_ext/djangodocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(self):
6666
msg = """Only one argument accepted for directive '{directive_name}::'.
6767
Comments should be provided as content,
6868
not as an extra argument.""".format(directive_name=self.name)
69-
raise ValueError(msg)
69+
raise self.error(msg)
7070

7171
env = self.state.document.settings.env
7272
ret = []

docs/howto/custom-management-commands.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ All attributes can be set in your derived class and can be used in
256256

257257
.. versionadded:: 1.6
258258

259-
The ``leave_locale_alone`` option was added in Django 1.6.
259+
The ``leave_locale_alone`` option was added in Django 1.6.
260260

261261
Methods
262262
-------

docs/howto/legacy-databases.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ access to your precious data on a model by model basis.
7575

7676
.. versionchanged:: 1.6
7777

78-
The behavior by which introspected models are created as unmanaged ones is new
79-
in Django 1.6.
78+
The behavior by which introspected models are created as unmanaged ones is new
79+
in Django 1.6.
8080

8181
Install the core Django tables
8282
==============================

docs/intro/contributing.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ This is a new feature, so it should be documented. Add the following on line
389389

390390
.. versionadded:: 1.5
391391

392-
The current value of the field will be displayed as a clickable link above the
393-
input widget.
392+
The current value of the field will be displayed as a clickable link above the
393+
input widget.
394394

395395
For more information on writing documentation, including an explanation of what
396396
the ``versionadded`` bit is all about, see

docs/ref/class-based-views/base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ TemplateView
105105
in the URL.
106106

107107
.. versionchanged:: 1.5
108+
108109
The context used to be populated with a ``{{ params }}`` dictionary of
109110
the parameters captured in the URL. Now those parameters are first-level
110111
context variables.

docs/ref/class-based-views/generic-date-based.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ YearArchiveView
142142

143143
.. versionchanged:: 1.5
144144

145-
Previously, this returned a string.
145+
Previously, this returned a string.
146146

147147
* ``next_year``: A :class:`~datetime.date` object
148148
representing the first day of the next year, according to

docs/ref/class-based-views/mixins-date-based.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,5 +330,6 @@ BaseDateListView
330330
:meth:`QuerySet.dates()<django.db.models.query.QuerySet.dates>`.
331331

332332
.. versionchanged:: 1.5
333+
333334
The ``ordering`` parameter was added, and the default order was
334335
changed to ascending.

docs/ref/class-based-views/mixins-editing.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ ProcessFormView
206206

207207
.. versionadded:: 1.6
208208

209-
``success_url`` may contain dictionary string formatting, which
210-
will be interpolated against the object's field attributes. For
211-
example, you could use ``success_url="/parent/%(parent_id)s/"`` to
212-
redirect to a URL composed out of the ``parent_id`` field on a model.
209+
``success_url`` may contain dictionary string formatting, which
210+
will be interpolated against the object's field attributes. For
211+
example, you could use ``success_url="/parent/%(parent_id)s/"`` to
212+
redirect to a URL composed out of the ``parent_id`` field on a model.
213213

214214
.. method:: get_success_url()
215215

docs/ref/class-based-views/mixins-simple.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ TemplateResponseMixin
6767
.. attribute:: content_type
6868

6969
.. versionadded:: 1.5
70-
The ``content_type`` attribute was added.
7170

7271
The content type to use for the response. ``content_type`` is passed
7372
as a keyword argument to ``response_class``. Default is ``None`` --

docs/ref/clickjacking.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ To set the same ``X-Frame-Options`` value for all responses in your site, put
6262
)
6363

6464
.. versionchanged:: 1.6
65+
6566
This middleware is enabled in the settings file generated by
6667
:djadmin:`startproject`.
6768

docs/ref/contrib/admin/index.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The admin is enabled in the default project template used by
1818
:djadmin:`startproject`.
1919

2020
.. versionchanged:: 1.6
21+
2122
In previous versions, the admin wasn't enabled by default.
2223

2324
For reference, here are the requirements:
@@ -1341,14 +1342,17 @@ templates used by the :class:`ModelAdmin` views:
13411342
return qs.filter(author=request.user)
13421343

13431344
.. versionchanged:: 1.6
1345+
13441346
The ``get_queryset`` method was previously named ``queryset``.
13451347

13461348
.. method:: ModelAdmin.message_user(request, message, level=messages.INFO, extra_tags='', fail_silently=False)
13471349

13481350
Sends a message to the user using the :mod:`django.contrib.messages`
13491351
backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`.
13501352

1351-
.. versionadded:: 1.5
1353+
.. versionchanged:: 1.5
1354+
1355+
Keyword arguments were added in Django 1.5.
13521356

13531357
Keyword arguments allow you to change the message level, add extra CSS
13541358
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
14511455
``django.jQuery`` object on changelist and add/edit views.
14521456

14531457
.. versionchanged:: 1.6
1458+
14541459
The embedded jQuery has been upgraded from 1.4.2 to 1.9.1.
14551460

14561461
The :class:`ModelAdmin` class requires jQuery by default, so there is no need

docs/ref/contrib/contenttypes.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,18 @@ lookup::
234234

235235
.. versionadded:: 1.5
236236

237-
Prior to Django 1.5,
238-
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
239-
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
240-
always returned the :class:`~django.contrib.contenttypes.models.ContentType`
241-
associated with the concrete model of the specified one(s). That means there
242-
was no way to retrieve the
243-
:class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
244-
using those methods. As of Django 1.5 you can now pass a boolean flag –
245-
``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
246-
wether or not you want to retrieve the
247-
:class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
248-
direct model.
237+
Prior to Django 1.5,
238+
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
239+
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
240+
always returned the :class:`~django.contrib.contenttypes.models.ContentType`
241+
associated with the concrete model of the specified one(s). That means there
242+
was no way to retrieve the
243+
:class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
244+
using those methods. As of Django 1.5 you can now pass a boolean flag –
245+
``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
246+
wether or not you want to retrieve the
247+
:class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
248+
direct model.
249249

250250
Generic relations
251251
=================

docs/ref/contrib/gis/geoquerysets.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ __ http://geohash.org/
950950
*Availability*: PostGIS, SpatiaLite
951951

952952
.. versionchanged:: 1.5
953+
953954
``geojson`` support for Spatialite > 3.0 has been added.
954955

955956
Attaches a ``geojson`` attribute to every model in the queryset that contains the

docs/ref/contrib/sites.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Enabling the sites framework
252252
============================
253253

254254
.. versionchanged:: 1.6
255+
255256
In previous versions, the sites framework was enabled by default.
256257

257258
To enable the sites framework, follow these steps:

docs/ref/databases.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Django supports MySQL 5.0.3 and higher.
182182
data on all database schema. Django's ``inspectdb`` feature uses it.
183183

184184
.. versionchanged:: 1.5
185+
185186
The minimum version requirement of MySQL 5.0.3 was set in Django 1.5.
186187

187188
Django expects the database to support Unicode (UTF-8 encoding) and delegates to

docs/ref/django-admin.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Can be run as a cronjob or directly to clean out old data from the database
9898
(only expired sessions at the moment).
9999

100100
.. versionchanged:: 1.5
101+
101102
:djadmin:`cleanup` is deprecated. Use :djadmin:`clearsessions` instead.
102103

103104
compilemessages
@@ -122,7 +123,7 @@ Example usage::
122123

123124
.. versionchanged:: 1.6
124125

125-
Added the ability to specify multiple locales.
126+
Added the ability to specify multiple locales.
126127

127128
createcachetable
128129
----------------
@@ -173,6 +174,7 @@ The :djadminopt:`--all` option may be provided to display all settings, even
173174
if they have Django's default value. Such settings are prefixed by ``"###"``.
174175

175176
.. versionadded:: 1.6
177+
176178
The :djadminopt:`--all` option was added.
177179

178180
dumpdata <appname appname appname.Model ...>
@@ -307,8 +309,8 @@ database to introspect.
307309

308310
.. versionchanged:: 1.6
309311

310-
The behavior by which introspected models are created as unmanaged ones is new
311-
in Django 1.6.
312+
The behavior by which introspected models are created as unmanaged ones is new
313+
in Django 1.6.
312314

313315
loaddata <fixture fixture ...>
314316
------------------------------
@@ -467,7 +469,7 @@ You can also use commas to separate multiple locales::
467469

468470
.. versionchanged:: 1.6
469471

470-
Added the ability to specify multiple locales.
472+
Added the ability to specify multiple locales.
471473

472474
.. django-admin-option:: --domain
473475

@@ -778,8 +780,6 @@ use the ``--plain`` option, like so::
778780

779781
django-admin.py shell --plain
780782

781-
.. versionchanged:: 1.5
782-
783783
If you would like to specify either IPython or bpython as your interpreter if
784784
you have both installed you can specify an alternative interpreter interface
785785
with the ``-i`` or ``--interface`` options like so:
@@ -807,9 +807,13 @@ behavior you can use the ``--no-startup`` option. e.g.::
807807

808808
django-admin.py shell --plain --no-startup
809809

810+
.. versionadded:: 1.5
811+
812+
The ``--interface`` option was added in Django 1.5.
813+
810814
.. versionadded:: 1.6
811815

812-
The ``--no-startup`` option was added in Django 1.6.
816+
The ``--no-startup`` option was added in Django 1.6.
813817

814818
sql <appname appname ...>
815819
-------------------------
@@ -1353,6 +1357,7 @@ for any other exception. If you specify ``--traceback``, ``django-admin.py``
13531357
will also output a full stack trace when a ``CommandError`` is raised.
13541358

13551359
.. versionchanged:: 1.6
1360+
13561361
Previously, Django didn't show a full stack trace by default for exceptions
13571362
other than ``CommandError``.
13581363

docs/ref/exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ the underlying database exceptions. See :pep:`249`, the Python Database API
138138
Specification v2.0, for further information.
139139

140140
.. versionchanged:: 1.6
141+
141142
Previous version of Django only wrapped ``DatabaseError`` and
142143
``IntegrityError``.
143144

docs/ref/forms/fields.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ For each field, we describe the default widget used if you don't specify
468468
``%(limit_value)s``, which will be substituted by the appropriate limit.
469469

470470
.. versionchanged:: 1.6
471+
471472
Similarly, the ``max_digits``, ``max_decimal_places`` and
472473
``max_whole_digits`` error messages may contain ``%(max)s``.
473474

@@ -1014,10 +1015,12 @@ objects (in the case of ``ModelMultipleChoiceField``) into the
10141015
``invalid_pk_value``
10151016

10161017
.. versionchanged:: 1.5
1018+
10171019
The empty and normalized values were changed to be consistently
10181020
``QuerySets`` instead of ``[]`` and ``QuerySet`` respectively.
10191021

10201022
.. versionchanged:: 1.6
1023+
10211024
The ``invalid_choice`` message may contain ``%(value)s`` and the
10221025
``invalid_pk_value`` message may contain ``%(pk)s``, which will be
10231026
substituted by the appropriate values.

docs/ref/forms/models.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Model Form Functions
4242

4343
.. versionchanged:: 1.6
4444

45-
The ``widgets`` and the ``validate_max`` parameters were added.
45+
The ``widgets`` and the ``validate_max`` parameters were added.
4646

4747
.. 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)
4848

@@ -57,4 +57,4 @@ Model Form Functions
5757

5858
.. versionchanged:: 1.6
5959

60-
The ``widgets`` and the ``validate_max`` parameters were added.
60+
The ``widgets`` and the ``validate_max`` parameters were added.

docs/ref/forms/validation.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ considering aren't valid, we must remember to remove them from the
359359

360360
.. versionchanged:: 1.5
361361

362-
Django used to remove the ``cleaned_data`` attribute entirely if there were
363-
any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
364-
the form doesn't validate, but it contains only field values that did
365-
validate.
362+
Django used to remove the ``cleaned_data`` attribute entirely if there were
363+
any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
364+
the form doesn't validate, but it contains only field values that did
365+
validate.

docs/ref/forms/widgets.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ Selector and checkbox widgets
522522
``True`` if the checkbox should be checked for that value.
523523

524524
.. versionchanged:: 1.5
525+
525526
Exceptions from ``check_test`` used to be silenced by its caller,
526527
this is no longer the case, they will propagate upwards.
527528

docs/ref/middleware.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ Transaction middleware
206206
.. class:: TransactionMiddleware
207207

208208
.. versionchanged:: 1.6
209+
209210
``TransactionMiddleware`` is deprecated. The documentation of transactions
210211
contains :ref:`upgrade instructions <transactions-upgrading-from-1.5>`.
211212

docs/ref/models/fields.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ If you need to accept :attr:`~Field.null` values then use
378378
:class:`NullBooleanField` instead.
379379

380380
.. versionchanged:: 1.6
381+
381382
The default value of ``BooleanField`` was changed from ``False`` to
382383
``None`` when :attr:`Field.default` isn't defined.
383384

@@ -956,8 +957,8 @@ Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
956957

957958
.. versionadded:: 1.5
958959

959-
The current value of the field will be displayed as a clickable link above the
960-
input widget.
960+
The current value of the field will be displayed as a clickable link above the
961+
input widget.
961962

962963

963964
Relationship fields

docs/ref/models/instances.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,9 @@ follows this algorithm:
297297
didn't update anything, Django executes an ``INSERT``.
298298

299299
.. versionchanged:: 1.6
300-
Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
301-
algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
300+
301+
Previously Django used ``SELECT`` - if not found ``INSERT`` else ``UPDATE``
302+
algorithm. The old algorithm resulted in one more query in ``UPDATE`` case.
302303

303304
The one gotcha here is that you should be careful not to specify a primary-key
304305
value explicitly when saving new objects, if you cannot guarantee the

0 commit comments

Comments
 (0)