From b057a8b247d14328f058b8bc89da0519516ced82 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 21 May 2010 14:07:54 +0000 Subject: 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 --- tests/regressiontests/forms/widgets.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/regressiontests/forms') diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py index 0b2ccebbb1..39d7d569a3 100644 --- a/tests/regressiontests/forms/widgets.py +++ b/tests/regressiontests/forms/widgets.py @@ -1135,6 +1135,7 @@ u'' u'' >>> activate('de-at') >>> settings.USE_L10N = True +>>> w.is_localized = True >>> w.render('date', d) u'' >>> deactivate() @@ -1176,6 +1177,7 @@ u'' >>> activate('de-at') >>> settings.USE_L10N = True +>>> w.is_localized = True >>> w.render('date', d) u'' >>> deactivate() @@ -1220,6 +1222,7 @@ u'' >>> activate('de-at') >>> settings.USE_L10N = True +>>> w.is_localized = True >>> w.render('date', d) u'' >>> deactivate() @@ -1259,6 +1262,7 @@ u'' >>> activate('de-at') >>> settings.USE_L10N = True +>>> w.is_localized = True >>> w.render('date', datetime.datetime(2007, 9, 17, 12, 51)) u'' >>> deactivate() -- cgit v1.3