diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2013-09-21 22:54:00 +0200 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2013-09-21 22:54:00 +0200 |
| commit | 56743cf9e337826e4c615909570bb057142a6a7b (patch) | |
| tree | ac3c2e9fe0aebf1ed833397cce1ce91be631dc47 /django/forms/forms.py | |
| parent | 9e4509107bf2967d8cba28f62b4117c525bd84b0 (diff) | |
Ensured that BoundField.as_widget always returns properly localized fields.
This is a follow-up to #18777 which improperly converted to strings in
prepare_value and as such caused regressions like #21074.
Refs #18777, #21074
Diffstat (limited to 'django/forms/forms.py')
| -rw-r--r-- | django/forms/forms.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py index 64d1550066..490d9c2c3b 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -463,6 +463,9 @@ class BoundField(object): if not widget: widget = self.field.widget + if self.field.localize: + widget.is_localized = True + attrs = attrs or {} auto_id = self.auto_id if auto_id and 'id' not in attrs and 'id' not in widget.attrs: |
