mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #5959 -- Fixed handling of False values in hidden boolean fields. Thanks,
SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -129,6 +129,13 @@ u'<input type="hidden" class="fun" value="\u0160\u0110\u0106\u017d\u0107\u017e\u
|
||||
>>> w.render('email', '', attrs={'class': 'special'})
|
||||
u'<input type="hidden" class="special" name="email" />'
|
||||
|
||||
Boolean values are rendered to their string forms ("True" and "False").
|
||||
>>> w = HiddenInput()
|
||||
>>> w.render('get_spam', False)
|
||||
u'<input type="hidden" name="get_spam" value="False" />'
|
||||
>>> w.render('get_spam', True)
|
||||
u'<input type="hidden" name="get_spam" value="True" />'
|
||||
|
||||
# MultipleHiddenInput Widget ##################################################
|
||||
|
||||
>>> w = MultipleHiddenInput()
|
||||
|
||||
Reference in New Issue
Block a user