Ticket #9384: 9384.2.diff

File 9384.2.diff, 1.5 KB (added by Thomas Güttler, 16 years ago)

Found an other typo in a comment.

  • docs/ref/forms/validation.txt

     
    100100
    101101When you really do need to attach the error to a particular field, you should
    102102store (or amend) a key in the `Form._errors` attribute. This attribute is an
    103 instance of a ``django.form.utils.ErrorDict`` class. Essentially, though, it's
     103instance of a ``django.forms.util.ErrorDict`` class. Essentially, though, it's
    104104just a dictionary. There is a key in the dictionary for each field in the form
    105105that has an error. Each value in the dictionary is a
    106 ``django.form.utils.ErrorList`` instance, which is a list that knows how to
     106``django.forms.util.ErrorList`` instance, which is a list that knows how to
    107107display itself in different ways. So you can treat `_errors` as a dictionary
    108108mapping field names to lists.
    109109
  • django/forms/fields.py

     
    681681        # a coercion function so that ModelForms with choices work. However,
    682682        # Django's Field.to_python raises django.core.exceptions.ValidationError,
    683683        # which is a *different* exception than
    684         # django.forms.utils.ValidationError. So unfortunatly we need to catch
     684        # django.forms.util.ValidationError. So unfortunatly we need to catch
    685685        # both.
    686686        try:
    687687            value = self.coerce(value)
Back to Top