#28355: Widget rendering of unicode values fails on Python 2 -----------------------------------------+------------------------ Reporter: Samir Shah | Owner: nobody Type: Uncategorized | Status: new Component: Forms | Version: 1.11 Severity: Normal | Keywords: widget Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -----------------------------------------+------------------------ The change to widget rendering in #28176 ([https://github.com/django/django/commit/221e6e18177516ac4ac95e40c344b93d14dd607b 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="" />' }}} -- Ticket URL: <https://code.djangoproject.com/ticket/28355> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/055.d77e9253001cd3c87986ebbaef07befe%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.