Opened 18 years ago
Closed 18 years ago
#3826 closed (wontfix)
`{% with %}` template tag
Reported by: | Chris Beaven | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Following on from the related discussion, here's a ticket for the {% with %}
tag.
Attachments (2)
Change History (7)
by , 18 years ago
Attachment: | with_tag.patch added |
---|
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
ready-for-checkin as per discussion on django-dev.
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
by , 18 years ago
Attachment: | with_template_tag.patch added |
---|
comment:3 by , 18 years ago
Patch needs improvement: | set |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
To use the with tag for more than one variable I need to nest the tags as follow:
{% with var1 as name1 %} {% with var2 as name2 %} {% with var3 as name 3 %} ... {% endwith %} {% endwith %} {% endwith %}
This is ugly, cost much typing and can be such confusing, I've done a patch to use one with tag to many variables I want to define, see:
{% with var1 as name1 and var2 as name2 and var3 as name3 %} ... {% endwith %}
comment:4 by , 18 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Ready for checkin → Design decision needed |
Michelts, I'll leave this ticket open, but in the future if you are suggesting enhancement to something that has already been fixed then please open a new ticket.
comment:5 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
The more compact form is not greatly more readable. Let's leave it as nested tags.
with tests and docs