Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #9384 -- Fixed a couple of typos. Thanks, Thomas Güttler and ro…

…mke.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 92a6c1429162d132a00c8b06efc960ba1d2dcc3e 1 parent 3b5d975
Malcolm Tredinnick authored
10  django/forms/fields.py
@@ -667,7 +667,7 @@ def __init__(self, *args, **kwargs):
667 667
         self.coerce = kwargs.pop('coerce', lambda val: val)
668 668
         self.empty_value = kwargs.pop('empty_value', '')
669 669
         super(TypedChoiceField, self).__init__(*args, **kwargs)
670  
-        
  670
+
671 671
     def clean(self, value):
672 672
         """
673 673
         Validate that the value is in self.choices and can be coerced to the
@@ -676,12 +676,12 @@ def clean(self, value):
676 676
         value = super(TypedChoiceField, self).clean(value)
677 677
         if value == self.empty_value or value in EMPTY_VALUES:
678 678
             return self.empty_value
679  
-        
  679
+
680 680
         # Hack alert: This field is purpose-made to use with Field.to_python as
681 681
         # a coercion function so that ModelForms with choices work. However,
682  
-        # Django's Field.to_python raises django.core.exceptions.ValidationError,
683  
-        # which is a *different* exception than
684  
-        # django.forms.utils.ValidationError. So unfortunatly we need to catch
  682
+        # Django's Field.to_python raises
  683
+        # django.core.exceptions.ValidationError, which is a *different*
  684
+        # exception than django.forms.util.ValidationError. So we need to catch
685 685
         # both.
686 686
         try:
687 687
             value = self.coerce(value)
4  docs/ref/forms/validation.txt
@@ -100,10 +100,10 @@ through the ``Form.non_field_errors()`` method.
100 100
 
101 101
 When you really do need to attach the error to a particular field, you should
102 102
 store (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
  103
+instance of a ``django.forms.util.ErrorDict`` class. Essentially, though, it's
104 104
 just a dictionary. There is a key in the dictionary for each field in the form
105 105
 that 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
107 107
 display itself in different ways. So you can treat `_errors` as a dictionary
108 108
 mapping field names to lists.
109 109
 

0 notes on commit 92a6c14

Please sign in to comment.
Something went wrong with that request. Please try again.