diff options
| author | Tim Graham <timograham@gmail.com> | 2013-09-16 12:52:05 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-16 12:52:05 -0400 |
| commit | 18ffdb1772ba60e085cff8fd9a1d4a7b129b4032 (patch) | |
| tree | 69ea529302e5c498e6b020b03c30e2ccf4a21936 /docs/ref | |
| parent | 8d29005524b141da8ff4d9b9bc4d858d43bb7154 (diff) | |
Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor KoĆodziej for the initial patch.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/forms/api.txt | 8 | ||||
| -rw-r--r-- | docs/ref/forms/validation.txt | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index f084273cd9..977da4b7be 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -571,12 +571,12 @@ method you're using:: Customizing the error list format ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default, forms use ``django.forms.util.ErrorList`` to format validation +By default, forms use ``django.forms.utils.ErrorList`` to format validation errors. If you'd like to use an alternate class for displaying errors, you can pass that in at construction time (replace ``__unicode__`` by ``__str__`` on Python 3):: - >>> from django.forms.util import ErrorList + >>> from django.forms.utils import ErrorList >>> class DivErrorList(ErrorList): ... def __unicode__(self): ... return self.as_divs() @@ -592,6 +592,10 @@ Python 3):: <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 ~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt index b6113098bb..c1e619113c 100644 --- a/docs/ref/forms/validation.txt +++ b/docs/ref/forms/validation.txt @@ -219,10 +219,10 @@ through the ``Form.non_field_errors()`` method. When you really do need to attach the error to a particular field, you should store (or amend) a key in the ``Form._errors`` attribute. This attribute is an -instance of a ``django.forms.util.ErrorDict`` class. Essentially, though, it's +instance of a ``django.forms.utils.ErrorDict`` class. Essentially, though, it's just a dictionary. There is a key in the dictionary for each field in the form that has an error. Each value in the dictionary is a -``django.forms.util.ErrorList`` instance, which is a list that knows how to +``django.forms.utils.ErrorList`` instance, which is a list that knows how to display itself in different ways. So you can treat ``_errors`` as a dictionary mapping field names to lists. |
