#28355 closed Bug (fixed)
Widget rendering of non-ASCII date/time formats fails on Python 2
Reported by: | Samir Shah | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.11 |
Severity: | Release blocker | Keywords: | widget |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The change to widget rendering in #28176 (PR) has broken the rendering of field values that contain unicode, on Python 2, when the input.html
template is used.
This works in Django 1.11.2:
import datetime from django import forms input = forms.TimeInput(format=u'τ-%H:%M') input.render('my-input', datetime.time(10, 10)) > u'<input type="text" name="my-input" value="\u03c4-10:10" />'
This fails in Django 1.11.3 however and an empty value is rendered instead:
> u'<input type="text" name="my-input" value="" />'
Change History (4)
comment:1 by , 7 years ago
Type: | Uncategorized → Bug |
---|
comment:2 by , 7 years ago
Has patch: | set |
---|---|
Severity: | Normal → Release blocker |
Summary: | Widget rendering of unicode values fails on Python 2 → Widget rendering of non-ASCII date/time formats fails on Python 2 |
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
PR