Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 9 additions and 1 deletion.
  1. +1 −1  django/newforms/fields.py
  2. +8 −0 docs/newforms.txt
View
2  django/newforms/fields.py
@@ -277,7 +277,7 @@ def clean(self, value):
val = smart_unicode(val)
new_value.append(val)
# Validate that each value in the value list is in self.choices.
- valid_values = set([k for k, v in self.choices])
+ valid_values = set([smart_unicode(k) for k, v in self.choices])
for val in new_value:
if val not in valid_values:
raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % val)
View
8 docs/newforms.txt
@@ -62,6 +62,14 @@ The library deals with these concepts:
* **Form** -- A collection of fields that knows how to validate itself and
display itself as HTML.
+
+
+Using forms with templates
+==========================
+
+Using forms in views
+====================
+
More coming soon
================
Please sign in to comment.
Something went wrong with that request. Please try again.