diff options
| author | caleb logan <clogan202@gmail.com> | 2017-08-28 18:42:03 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-08-29 14:56:23 -0400 |
| commit | 3bb03df0fc642c48ff70cdd74572c31f135f9c08 (patch) | |
| tree | b1045d2c6bc88808f9229d98ff65beefefd53033 /django | |
| parent | c685b8f838f7f9411a2a65fba7e3893f15439e18 (diff) | |
[1.11.x] Fixed #28530 -- Prevented SelectDateWidget from localizing years in output.
Backport of 9e2bf65d6a5dc3b53db84f4839652f0d154349ee from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/forms/widgets.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index d93fc1dbdc..d046d3f001 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -943,7 +943,7 @@ class SelectDateWidget(Widget): def get_context(self, name, value, attrs): context = super(SelectDateWidget, self).get_context(name, value, attrs) date_context = {} - year_choices = [(i, i) for i in self.years] + year_choices = [(i, force_text(i)) for i in self.years] if self.is_required is False: year_choices.insert(0, self.year_none_value) year_attrs = context['widget']['attrs'].copy() |
