mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Removed versionadded/changed notes for 1.7.
This commit is contained in:
parent
0e60912492
commit
c79faae761
64 changed files with 100 additions and 864 deletions
|
@ -125,8 +125,6 @@ if validation has side effects, those side effects will only be triggered once.
|
|||
|
||||
.. method:: Form.errors.as_data()
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
Returns a ``dict`` that maps fields to their original ``ValidationError``
|
||||
instances.
|
||||
|
||||
|
@ -150,8 +148,6 @@ messages in ``Form.errors``.
|
|||
|
||||
.. method:: Form.errors.as_json(escape_html=False)
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
Returns the errors serialized as JSON.
|
||||
|
||||
>>> f.errors.as_json()
|
||||
|
@ -171,8 +167,6 @@ directly in HTML.
|
|||
|
||||
.. method:: Form.add_error(field, error)
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
This method allows adding errors to specific fields from within the
|
||||
``Form.clean()`` method, or from outside the form altogether; for instance
|
||||
from a view.
|
||||
|
@ -762,10 +756,6 @@ Python 2)::
|
|||
<p>Sender: <input type="email" name="sender" value="invalid email address" /></p>
|
||||
<p>Cc myself: <input checked="checked" type="checkbox" name="cc_myself" /></p>
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
|
||||
``django.forms.util`` was renamed to ``django.forms.utils``.
|
||||
|
||||
More granular output
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -1017,10 +1007,8 @@ classes::
|
|||
<li>Instrument: <input type="text" name="instrument" /></li>
|
||||
<li>Haircut type: <input type="text" name="haircut_type" /></li>
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
* It's possible to declaratively remove a ``Field`` inherited from a parent
|
||||
class by setting the name to be ``None`` on the subclass. For example::
|
||||
It's possible to declaratively remove a ``Field`` inherited from a parent class
|
||||
by setting the name to be ``None`` on the subclass. For example::
|
||||
|
||||
>>> from django import forms
|
||||
|
||||
|
|
|
@ -970,8 +970,6 @@ Slightly complex built-in ``Field`` classes
|
|||
|
||||
.. attribute:: require_all_fields
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
Defaults to ``True``, in which case a ``required`` validation error
|
||||
will be raised if no value is supplied for any field.
|
||||
|
||||
|
|
|
@ -13,7 +13,3 @@ Formset API reference. For introductory material about formsets, see the
|
|||
Returns a ``FormSet`` class for the given ``form`` class.
|
||||
|
||||
See :ref:`formsets` for example usage.
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
|
||||
The ``min_num`` and ``validate_min`` parameters were added.
|
||||
|
|
|
@ -179,8 +179,6 @@ to override your error message you can still opt for the less verbose::
|
|||
|
||||
ValidationError(_('Invalid value: %s') % value)
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
The :meth:`Form.errors.as_data() <django.forms.Form.errors.as_data()>` and
|
||||
:meth:`Form.errors.as_json() <django.forms.Form.errors.as_json()>` methods
|
||||
greatly benefit from fully featured ``ValidationError``\s (with a ``code`` name
|
||||
|
@ -369,12 +367,6 @@ example::
|
|||
raise forms.ValidationError("Did not send for 'help' in "
|
||||
"the subject despite CC'ing yourself.")
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
|
||||
In previous versions of Django, ``form.clean()`` was required to return
|
||||
a dictionary of ``cleaned_data``. This method may still return a dictionary
|
||||
of data to be used, but it's no longer required.
|
||||
|
||||
In this code, if the validation error is raised, the form will display an
|
||||
error message at the top of the form (normally) describing the problem.
|
||||
|
||||
|
|
|
@ -650,8 +650,6 @@ Selector and checkbox widgets
|
|||
The outer ``<ul>`` container will receive the ``id`` attribute defined on
|
||||
the widget.
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
|
||||
When looping over the radio buttons, the ``label`` and ``input`` tags include
|
||||
``for`` and ``id`` attributes, respectively. Each radio button has an
|
||||
``id_for_label`` attribute to output the element's ID.
|
||||
|
@ -677,11 +675,9 @@ Selector and checkbox widgets
|
|||
Like :class:`RadioSelect`, you can now loop over the individual checkboxes making
|
||||
up the lists. See the documentation of :class:`RadioSelect` for more details.
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
|
||||
When looping over the checkboxes, the ``label`` and ``input`` tags include
|
||||
``for`` and ``id`` attributes, respectively. Each checkbox has an
|
||||
``id_for_label`` attribute to output the element's ID.
|
||||
When looping over the checkboxes, the ``label`` and ``input`` tags include
|
||||
``for`` and ``id`` attributes, respectively. Each checkbox has an
|
||||
``id_for_label`` attribute to output the element's ID.
|
||||
|
||||
.. _file-upload-widgets:
|
||||
|
||||
|
@ -769,8 +765,6 @@ Composite widgets
|
|||
|
||||
.. attribute:: SelectDateWidget.months
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
An optional dict of months to use in the "months" select box.
|
||||
|
||||
The keys of the dict correspond to the month number (1-indexed) and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue