summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorcaleb logan <clogan202@gmail.com>2017-08-29 11:56:08 -0700
committerTim Graham <timograham@gmail.com>2017-08-29 14:56:08 -0400
commit9e2bf65d6a5dc3b53db84f4839652f0d154349ee (patch)
tree75af8d47c4b3455f9c98ccf73dcf85d889cd90d6 /django/forms
parent44ce308281cc38353b635af842984c45fd2a00e4 (diff)
Fixed #28530 -- Prevented SelectDateWidget from localizing years in output.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index f306abdec6..35904d3372 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -958,7 +958,7 @@ class SelectDateWidget(Widget):
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
date_context = {}
- year_choices = [(i, i) for i in self.years]
+ year_choices = [(i, str(i)) for i in self.years]
if not self.is_required:
year_choices.insert(0, self.year_none_value)
year_attrs = context['widget']['attrs'].copy()