[Django] #33431: Regroup Violates Syntax Expectations

8 views
Skip to first unread message

Django

unread,
Jan 11, 2022, 9:29:24 AM1/11/22
to django-...@googlegroups.com
#33431: Regroup Violates Syntax Expectations
-------------------------------------------+-------------------------
Reporter: Caleb White | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 3.2
Severity: Normal | Keywords: regroup
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+-------------------------
I would like to re-report the following issue from 16 years ago:
https://code.djangoproject.com/ticket/1461

I hope that it is obvious why it would be useful to dynamically resolve
this variable.

I spent a long time trying to figure out why `group_key.grouper` was
always `None` for me, and it's because the variable I'm using as the
grouping token is being treated as a string rather than a variable.

Honestly this seems like a serious design flaw in the template language
itself - why are unquoted tokens ever treated as strings? How is the user
of the template language supposed to know whether a given token will be
resolved as a variable or treated as a literal string? This is very
confusing and I can't find any explanation in the documentation of why
this is the case. I can't think of any benefit gained by all of this
ambiguity, so I imagine the only reason not to change this is going to be
backwards compatibility.

As far as I can tell, this bug is present in every version of Django.

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

Django

unread,
Jan 11, 2022, 10:18:38 AM1/11/22
to django-...@googlegroups.com
#33431: Regroup Violates Syntax Expectations
---------------------------------+--------------------------------------

Reporter: Caleb White | Owner: nobody
Type: Bug | Status: closed

Component: Template system | Version: 3.2
Severity: Normal | Resolution: duplicate

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

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


Comment:

We ask that you not create duplicate tickets but rather write to the
DevelopersMailingList to make your case to revisit the wontfix decision.

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

Django

unread,
Jan 12, 2022, 3:03:05 AM1/12/22
to django-...@googlegroups.com
#33431: Regroup Violates Syntax Expectations
---------------------------------+--------------------------------------

Reporter: Caleb White | Owner: nobody
Type: Bug | Status: closed

Component: Template system | Version: 3.2
Severity: Normal | Resolution: duplicate

Keywords: regroup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by Carlton Gibson):

Also Caleb, if you do follow-up, please include a minimal example
demonstrating the issue, otherwise you're asking folks to do a lot of
archeology in order to see the problem, and that reduces your chances of
getting a timely response. Thanks.

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

Reply all
Reply to author
Forward
0 new messages