[Django] #28355: Widget rendering of unicode values fails on Python 2

7 views
Skip to first unread message

Django

unread,
Jul 2, 2017, 2:16:29 AM7/2/17
to django-...@googlegroups.com
#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.

Django

unread,
Jul 3, 2017, 12:12:14 AM7/3/17
to django-...@googlegroups.com
#28355: Widget rendering of unicode values fails on Python 2
----------------------------+--------------------------------------

Reporter: Samir Shah | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Resolution:

Keywords: widget | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by Samir Shah):

* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/28355#comment:1>

Django

unread,
Jul 3, 2017, 10:20:53 AM7/3/17
to django-...@googlegroups.com
#28355: Widget rendering of non-ASCII date/time formats fails on Python 2
---------------------------------+------------------------------------

Reporter: Samir Shah | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: widget | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/8697 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28355#comment:2>

Django

unread,
Jul 6, 2017, 8:03:25 AM7/6/17
to django-...@googlegroups.com
#28355: Widget rendering of non-ASCII date/time formats fails on Python 2
---------------------------------+------------------------------------
Reporter: Samir Shah | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 1.11
Severity: Release blocker | Resolution: fixed

Keywords: widget | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"81febf4defe6f6da2dea80f24082b282b8bf30ca" 81febf4d]:
{{{
#!CommitTicketReference repository=""
revision="81febf4defe6f6da2dea80f24082b282b8bf30ca"
[1.11.x] Fixed #28355 -- Fixed widget rendering of non-ASCII date/time
formats on Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28355#comment:3>

Django

unread,
Jul 6, 2017, 8:17:59 AM7/6/17
to django-...@googlegroups.com
#28355: Widget rendering of non-ASCII date/time formats fails on Python 2
---------------------------------+------------------------------------
Reporter: Samir Shah | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 1.11

Severity: Release blocker | Resolution: fixed
Keywords: widget | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"42e91cd6f4a5ea79ebacbc58a9ffaf115d8800d5" 42e91cd]:
{{{
#!CommitTicketReference repository=""
revision="42e91cd6f4a5ea79ebacbc58a9ffaf115d8800d5"
Refs #28355 -- Forwardported 1.11.4 release note.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28355#comment:4>

Reply all
Reply to author
Forward
0 new messages