#19890 closed Cleanup/optimization (fixed)
ifchanged tag renders the nodelist_true part twice
Reported by: | Diederik van der Boor | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 1.4 |
Severity: | Normal | Keywords: | sprint2013 |
Cc: | chrismedrela | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The {% ifchanged %}foo{% endifchanged %}
node renders the contents twice;
- First to compare it with the previous value
- The second time to return the rendered output.
This was discovered while fixing 15849
Attachments (1)
Change History (8)
by , 12 years ago
Attachment: | 19890-fix-double-ifchanged-rendering.patch added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 12 years ago
Keywords: | sprint2013 added |
---|
comment:4 by , 12 years ago
Cc: | added |
---|---|
Triage Stage: | Accepted → Ready for checkin |
The patch seems good to me. I simplified the test and added pull request: https://github.com/django/django/pull/832.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The patch can be applied after merging #15849