Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed small Unicode error in newforms. Thanks, Honza Král. Refs #3114

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4e72dc86ff30b2e551b0891ac6dbf23f032a4bf8 1 parent 5f36d9d
Adrian Holovaty authored December 08, 2006
2  django/newforms/fields.py
@@ -277,7 +277,7 @@ def clean(self, value):
277 277
             val = smart_unicode(val)
278 278
             new_value.append(val)
279 279
         # Validate that each value in the value list is in self.choices.
280  
-        valid_values = set([k for k, v in self.choices])
  280
+        valid_values = set([smart_unicode(k) for k, v in self.choices])
281 281
         for val in new_value:
282 282
             if val not in valid_values:
283 283
                 raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % val)
8  docs/newforms.txt
@@ -62,6 +62,14 @@ The library deals with these concepts:
62 62
     * **Form** -- A collection of fields that knows how to validate itself and
63 63
       display itself as HTML.
64 64
 
  65
+
  66
+
  67
+Using forms with templates
  68
+==========================
  69
+
  70
+Using forms in views
  71
+====================
  72
+
65 73
 More coming soon
66 74
 ================
67 75
 

0 notes on commit 4e72dc8

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