summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/extra.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-05-23 10:38:23 +0000
committerJannis Leidel <jannis@leidel.info>2010-05-23 10:38:23 +0000
commite6ec07dc1f9070df4dab982aa4567def924bfe01 (patch)
tree2b57bf063d5c9e6d5b0975058dfcff677997e1cc /tests/regressiontests/forms/extra.py
parent6b2d6e18338631367c5a61896d872dbe27d2097e (diff)
Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 when localization is enabled. Thanks for the report and patch, magnus.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/extra.py')
-rw-r--r--tests/regressiontests/forms/extra.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/extra.py b/tests/regressiontests/forms/extra.py
index 7547901d0f..57e8e91a60 100644
--- a/tests/regressiontests/forms/extra.py
+++ b/tests/regressiontests/forms/extra.py
@@ -435,6 +435,11 @@ USE_L10N tests
<option value="2016">2016</option>
</select>
+Years before 1900 work
+>>> w = SelectDateWidget(years=('1899',))
+>>> w.value_from_datadict({'date_year': '1899', 'date_month': '8', 'date_day': '13'}, {}, 'date')
+'13-08-1899'
+
>>> translation.deactivate()
# MultiWidget and MultiValueField #############################################