From 221e6e18177516ac4ac95e40c344b93d14dd607b Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 15 Jun 2017 11:05:21 -0400 Subject: Fixed #28176 -- Restored the uncasted option value in ChoiceWidget template context. --- django/forms/templates/django/forms/widgets/input.html | 2 +- django/forms/templates/django/forms/widgets/select_option.html | 2 +- django/forms/widgets.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'django/forms') diff --git a/django/forms/templates/django/forms/widgets/input.html b/django/forms/templates/django/forms/widgets/input.html index abbdf6bd26..5feef43c55 100644 --- a/django/forms/templates/django/forms/widgets/input.html +++ b/django/forms/templates/django/forms/widgets/input.html @@ -1 +1 @@ - + diff --git a/django/forms/templates/django/forms/widgets/select_option.html b/django/forms/templates/django/forms/widgets/select_option.html index c6355f69dd..8d31961dd3 100644 --- a/django/forms/templates/django/forms/widgets/select_option.html +++ b/django/forms/templates/django/forms/widgets/select_option.html @@ -1 +1 @@ - + diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 5b47aa691d..282ba0b481 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -591,7 +591,7 @@ class ChoiceWidget(Widget): option_attrs['id'] = self.id_for_label(option_attrs['id'], index) return { 'name': name, - 'value': str(value), + 'value': value, 'label': label, 'selected': selected, 'index': index, -- cgit v1.3