1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Removed versionadded/changed annotations for 1.8.

This commit is contained in:
Tim Graham
2015-09-12 16:27:30 -04:00
parent 48e7787db5
commit 54848a96dd
74 changed files with 44 additions and 852 deletions

View File

@@ -185,8 +185,6 @@ Note that ``Form.add_error()`` automatically removes the relevant field from
.. method:: Form.has_error(field, code=None)
.. versionadded:: 1.8
This method returns a boolean designating whether a field has an error with
a specific error ``code``. If ``code`` is ``None``, it will return ``True``
if the field contains any errors at all.
@@ -570,11 +568,6 @@ classes, as needed. The HTML will look something like::
>>> f['subject'].label_tag(attrs={'class': 'foo'})
<label for="id_subject" class="foo required">Subject:</label>
.. versionchanged:: 1.8
The ``required_css_class`` will also be added to the ``<label>`` tag as
seen above.
.. _ref-forms-api-configuring-label:
Configuring form elements' HTML ``id`` attributes and ``<label>`` tags
@@ -693,8 +686,6 @@ Note that the label suffix is added only if the last character of the
label isn't a punctuation character (in English, those are ``.``, ``!``, ``?``
or ``:``).
.. versionadded:: 1.8
Fields can also define their own :attr:`~django.forms.Field.label_suffix`.
This will take precedence over :attr:`Form.label_suffix
<django.forms.Form.label_suffix>`. The suffix can also be overridden at runtime
@@ -990,10 +981,6 @@ Methods of ``BoundField``
fields. If you need to do this in a template, you could write a custom
filter to allow passing parameters to ``label_tag``.
.. versionchanged:: 1.8
The label includes :attr:`~Form.required_css_class` if applicable.
.. method:: BoundField.value()
Use this method to render the raw value of this field as it would be rendered

View File

@@ -124,8 +124,6 @@ We've specified ``auto_id=False`` to simplify the output::
.. attribute:: Field.label_suffix
.. versionadded:: 1.8
The ``label_suffix`` argument lets you override the form's
:attr:`~django.forms.Form.label_suffix` on a per-field basis::
@@ -319,10 +317,6 @@ Checking if the field data has changed
.. method:: Field.has_changed()
.. versionchanged:: 1.8
This method was renamed from ``_has_changed()``.
The ``has_changed()`` method is used to determine if the field value has changed
from the initial value. Returns ``True`` or ``False``.
@@ -412,10 +406,6 @@ For each field, we describe the default widget used if you don't specify
choices <field-choices>` for more details. If the argument is a
callable, it is evaluated each time the field's form is initialized.
.. versionchanged:: 1.8
The ability to pass a callable to ``choices`` was added.
``TypedChoiceField``
~~~~~~~~~~~~~~~~~~~~
@@ -561,8 +551,6 @@ For each field, we describe the default widget used if you don't specify
``DurationField``
~~~~~~~~~~~~~~~~~
.. versionadded:: 1.8
.. class:: DurationField(**kwargs)
* Default widget: :class:`TextInput`
@@ -708,11 +696,6 @@ For each field, we describe the default widget used if you don't specify
``UploadedFile.content_type`` will be updated with the image's content type
if Pillow can determine it, otherwise it will be set to ``None``.
.. versionchanged:: 1.8
The ``image`` and ``content_type`` attributes described in the last
paragraph were added.
.. _Pillow: http://pillow.readthedocs.org/en/latest/
.. _Image: https://pillow.readthedocs.org/en/latest/reference/Image.html
@@ -922,8 +905,6 @@ For each field, we describe the default widget used if you don't specify
``UUIDField``
~~~~~~~~~~~~~
.. versionadded:: 1.8
.. class:: UUIDField(**kwargs)
* Default widget: :class:`TextInput`

View File

@@ -46,11 +46,6 @@ Model Form API reference. For introductory material about model forms, see the
information. Omitting any definition of the fields to use will result in
an :exc:`~django.core.exceptions.ImproperlyConfigured` exception.
.. versionchanged:: 1.8
Previously, omitting the list of fields was allowed and resulted in
a form with all fields of the model.
.. versionadded:: 1.9
The ``field_classes`` keyword argument was added.

View File

@@ -206,18 +206,16 @@ foundation for custom widgets.
>>> name.render('name', 'A name')
'<input title="Your name" type="text" name="name" value="A name" size="10" />'
.. versionchanged:: 1.8
If you assign a value of ``True`` or ``False`` to an attribute,
it will be rendered as an HTML5 boolean attribute::
If you assign a value of ``True`` or ``False`` to an attribute,
it will be rendered as an HTML5 boolean attribute::
>>> name = forms.TextInput(attrs={'required': True})
>>> name.render('name', 'A name')
'<input name="name" type="text" value="A name" required />'
>>>
>>> name = forms.TextInput(attrs={'required': False})
>>> name.render('name', 'A name')
'<input name="name" type="text" value="A name" />'
>>> name = forms.TextInput(attrs={'required': True})
>>> name.render('name', 'A name')
'<input name="name" type="text" value="A name" required />'
>>>
>>> name = forms.TextInput(attrs={'required': False})
>>> name.render('name', 'A name')
'<input name="name" type="text" value="A name" />'
.. attribute:: Widget.supports_microseconds
@@ -809,8 +807,6 @@ Composite widgets
.. attribute:: SelectDateWidget.empty_label
.. versionadded:: 1.8
If the :class:`~django.forms.DateField` is not required,
:class:`SelectDateWidget` will have an empty choice at the top of the
list (which is ``---`` by default). You can change the text of this