mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #13560 -- Fixed localization of widgets.
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -105,6 +105,7 @@ HTML escaped.
|
||||
<p class="datetime">Date: <input value="2007-12-01" type="text" class="vDateField" name="test_0" size="10" /><br />Time: <input value="09:30:00" type="text" class="vTimeField" name="test_1" size="8" /></p>
|
||||
>>> activate('de-at')
|
||||
>>> settings.USE_L10N = True
|
||||
>>> w.is_localized = True
|
||||
>>> print conditional_escape(w.render('test', datetime(2007, 12, 1, 9, 30)))
|
||||
<p class="datetime">Datum: <input value="01.12.2007" type="text" class="vDateField" name="test_0" size="10" /><br />Zeit: <input value="09:30:00" type="text" class="vTimeField" name="test_1" size="8" /></p>
|
||||
>>> deactivate()
|
||||
|
||||
Reference in New Issue
Block a user