[Django] #32208: add filter is unable to concatenate strings with lazy string

29 views
Skip to first unread message

Django

unread,
Nov 19, 2020, 9:02:31 AM11/19/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------------+------------------------
Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------------+------------------------
If you try to concatenate a string with a lazy string with the `add`
template filter, the result is always the empty string because the `add`
filter generates an exception (`TypeError: can only concatenate str (not
"__proxy__") to str`).

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

Django

unread,
Nov 19, 2020, 3:24:40 PM11/19/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
---------------------------------+--------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:

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

* Attachment "32208-tests.diff" added.

Tests.

Django

unread,
Nov 19, 2020, 3:25:12 PM11/19/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
---------------------------------+------------------------------------

Reporter: Claude Paroz | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* stage: Unreviewed => Accepted


Comment:

Thanks. I attached a test.

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

Django

unread,
Nov 20, 2020, 4:11:26 AM11/20/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner:
| Blackeyeforreal
Type: Bug | Status: assigned

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Blackeyeforreal):

* owner: nobody => Blackeyeforreal
* status: new => assigned


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

Django

unread,
Nov 24, 2020, 1:40:54 AM11/24/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner:
| Blackeyeforreal
Type: Bug | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


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

Django

unread,
Nov 26, 2020, 1:16:56 AM11/26/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner:
| Blackeyeforreal
Type: Bug | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


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

Django

unread,
Dec 21, 2020, 2:36:03 AM12/21/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Hasan
| Ramezani
Type: Bug | Status: assigned

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: Blackeyeforreal => Hasan Ramezani
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/13794 New PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32208#comment:5>

Django

unread,
Dec 21, 2020, 3:45:49 AM12/21/20
to django-...@googlegroups.com
#32208: add filter is unable to concatenate strings with lazy string
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: Hasan
| Ramezani
Type: Bug | Status: closed

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

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"577f2338f16bea055abc49c5a43fa3ecb05dffc8" 577f2338]:
{{{
#!CommitTicketReference repository=""
revision="577f2338f16bea055abc49c5a43fa3ecb05dffc8"
Fixed #32208 -- Allowed adding lazy() objects.

Co-authored-by: Claude Paroz <cla...@2xlibre.net>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32208#comment:6>

Reply all
Reply to author
Forward
0 new messages