[Django] #29288: {% widthratio %} fails to assign to variable on exceptions

3 views
Skip to first unread message

Django

unread,
Apr 4, 2018, 4:18:27 AM4/4/18
to django-...@googlegroups.com
#29288: {% widthratio %} fails to assign to variable on exceptions
-------------------------------------+-------------------------------------
Reporter: Jirka | Owner: nobody
Vejrazka |
Type: Bug | Status: new
Component: Template | Version: master
system | Keywords: templatetag,
Severity: Normal | widthratio
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When an exception happens inside widthratio template tag, the result is
returned as a string instead of being assigned to a variable even if "as
variable is used in the template tag.

--
Ticket URL: <https://code.djangoproject.com/ticket/29288>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 4, 2018, 4:38:31 AM4/4/18
to django-...@googlegroups.com
#29288: {% widthratio %} fails to assign to variable on exceptions
-------------------------------------+-------------------------------------
Reporter: Jirka Vejrazka | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: templatetag, | Triage Stage:
widthratio | Unreviewed
Has patch: 0 | Needs documentation: 0

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

Comment (by Jirka Vejrazka):

Fix in https://github.com/django/django/pull/9853

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

Django

unread,
Apr 4, 2018, 6:48:19 AM4/4/18
to django-...@googlegroups.com
#29288: {% widthratio %} fails to assign to variable if exception happens

-------------------------------------+-------------------------------------
Reporter: Jirka Vejrazka | Owner: nobody
Type: Bug | Status: new

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: templatetag, | Triage Stage:
widthratio | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Jirka Vejrazka:

Old description:

> When an exception happens inside widthratio template tag, the result is
> returned as a string instead of being assigned to a variable even if "as
> variable is used in the template tag.

New description:

When an exception happens inside the `widthratio` template tag, the result


is returned as a string instead of being assigned to a variable even if
`as variable` is used in the template tag.

--

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

Django

unread,
Apr 4, 2018, 9:23:52 AM4/4/18
to django-...@googlegroups.com
#29288: {% widthratio %} fails to assign to variable if exception happens
-------------------------------------+-------------------------------------
Reporter: Jirka Vejrazka | Owner: nobody
Type: Bug | Status: new

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: templatetag, | Triage Stage: Accepted
widthratio |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Issue seems reasonable. Test cases fail without patch. I just had a couple
of comments on the PR.

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

Django

unread,
Apr 4, 2018, 2:03:32 PM4/4/18
to django-...@googlegroups.com
#29288: {% widthratio %} fails to assign to variable if exception happens
-------------------------------------+-------------------------------------
Reporter: Jirka Vejrazka | Owner: nobody
Type: Bug | Status: closed

Component: Template system | Version: master
Severity: Normal | Resolution: fixed

Keywords: templatetag, | Triage Stage: Accepted
widthratio |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

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


Comment:

In [changeset:"6148dda72f47e40754fc2eb75d86274fb68f2d41" 6148dda7]:
{{{
#!CommitTicketReference repository=""
revision="6148dda72f47e40754fc2eb75d86274fb68f2d41"
Fixed #29288 -- Made {% widthratio %} assign to as var if an exception
occurs.
}}}

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

Reply all
Reply to author
Forward
0 new messages