[Django] #36306: Allow simple_tag to parse @/:/- attributes

5 views
Skip to first unread message

Django

unread,
Apr 8, 2025, 8:16:39 AM4/8/25
to django-...@googlegroups.com
#36306: Allow simple_tag to parse @/:/- attributes
-------------------------------------+-------------------------------------
Reporter: Giannis Terzopoulos | Type: New
| feature
Status: new | Component:
| Uncategorized
Version: | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
I'm following up on the forum discussion:
https://forum.djangoproject.com/t/proposal-allow-simple-tag-to-parse-
attributes/36769

I think a sensible first step is trying an opt-in argument as Adam
suggested, e.g., `allow_all_attrs=True` or perhaps
`allow_all_html_attrs=True`.

For implementation details, I propose:
1. Whitelisting common punctuation characters (`@`, `:`, `-`) for
attribute names
2. Making these attributes accessible directly (only) from kwargs, such as
`kwargs["@hello"]`
--
Ticket URL: <https://code.djangoproject.com/ticket/36306>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 8, 2025, 8:16:57 AM4/8/25
to django-...@googlegroups.com
#36306: Allow simple_tag to parse @/:/- attributes
-------------------------------------+-------------------------------------
Reporter: Giannis Terzopoulos | Owner: Giannis
| Terzopoulos
Type: New feature | Status: assigned
Component: Uncategorized | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Giannis Terzopoulos):

* owner: (none) => Giannis Terzopoulos
* status: new => assigned

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

Django

unread,
Apr 8, 2025, 2:37:42 PM4/8/25
to django-...@googlegroups.com
#36306: Allow simple_tag to parse @/:/- attributes
-------------------------------------+-------------------------------------
Reporter: Giannis Terzopoulos | Owner: Giannis
| Terzopoulos
Type: New feature | Status: closed
Component: Template system | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* component: Uncategorized => Template system
* resolution: => wontfix
* status: assigned => closed
* version: => dev

Comment:

Hello Giannis, thanks a lot for opening this ticket and sharing the idea
in the forum!

I took a look at the related forum thread, and while I think you are
following the right procedure, I feel there is not enough consensus around
this yet. As far as I can tell, only Adam has expressed support, and the
use case and overall value of the feature still feel a bit unclear (at
least to me).

I'm going to close this ticket as `wontfix` for now, but I'm definitely
happy to revisit and reopen it if the idea gains more traction or if
there's a clearer picture of the need and benefit. I'll also cross-post in
the forum to invite more discussion and see if we can get a broader sense
of interest.

Thanks again for taking the time to bring this up!
--
Ticket URL: <https://code.djangoproject.com/ticket/36306#comment:2>

Django

unread,
Apr 8, 2025, 2:38:44 PM4/8/25
to django-...@googlegroups.com
#36306: Allow simple_tag to parse @/:/- attributes
-------------------------------------+-------------------------------------
Reporter: Giannis Terzopoulos | Owner: Giannis
| Terzopoulos
Type: New feature | Status: closed
Component: Template system | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* cc: Carlton Gibson, Adam Johnson (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36306#comment:3>
Reply all
Reply to author
Forward
0 new messages