mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
unicode: Improved the test slightly for RadioSelect widgets with unicode
choices. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e1593cca3f
commit
9de774aad8
@ -30,10 +30,10 @@ There were some problems with form translations in #3600
|
|||||||
# >>> deactivate()
|
# >>> deactivate()
|
||||||
|
|
||||||
Unicode decoding problems...
|
Unicode decoding problems...
|
||||||
>>> GENDERS = (('0', u'En tied\xe4'), ('1', u'Mies'), ('2', u'Nainen'))
|
>>> GENDERS = ((u'\xc5', u'En tied\xe4'), (u'\xf8', u'Mies'), (u'\xdf', u'Nainen'))
|
||||||
>>> class SomeForm(Form):
|
>>> class SomeForm(Form):
|
||||||
... somechoice = ChoiceField(choices=GENDERS, widget=RadioSelect())
|
... somechoice = ChoiceField(choices=GENDERS, widget=RadioSelect(), label=u'\xc5\xf8\xdf')
|
||||||
>>> f = SomeForm()
|
>>> f = SomeForm()
|
||||||
>>> f.as_p()
|
>>> f.as_p()
|
||||||
u'<p><label for="id_somechoice_0">Somechoice:</label> <ul>\n<li><label><input type="radio" id="id_somechoice_0" value="0" name="somechoice" /> En tied\xe4</label></li>\n<li><label><input type="radio" id="id_somechoice_1" value="1" name="somechoice" /> Mies</label></li>\n<li><label><input type="radio" id="id_somechoice_2" value="2" name="somechoice" /> Nainen</label></li>\n</ul></p>'
|
u'<p><label for="id_somechoice_0">\xc5\xf8\xdf:</label> <ul>\n<li><label><input type="radio" id="id_somechoice_0" value="\xc5" name="somechoice" /> En tied\xe4</label></li>\n<li><label><input type="radio" id="id_somechoice_1" value="\xf8" name="somechoice" /> Mies</label></li>\n<li><label><input type="radio" id="id_somechoice_2" value="\xdf" name="somechoice" /> Nainen</label></li>\n</ul></p>'
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user