mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #28176 -- Restored the uncasted option value in ChoiceWidget template context.
This commit is contained in:
@@ -1 +1 @@
|
||||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
|
||||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
|
||||
|
||||
@@ -1 +1 @@
|
||||
<option value="{{ widget.value }}"{% include "django/forms/widgets/attrs.html" %}>{{ widget.label }}</option>
|
||||
<option value="{{ widget.value|stringformat:'s' }}"{% include "django/forms/widgets/attrs.html" %}>{{ widget.label }}</option>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user