#7501: template rendering doesn't reset cycle tag
---------------------------------------------+------------------------------
Reporter: mitsuhiko | Owner: nobody
Status: new | Milestone:
Component: Template system | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by bpeschier):
I came across this a few times when rendering multiple tables next to each
other with the same cycle (with 2 arguments for colouring) on a row. A
double loop. If a table had an even amount of rows, the colours matched,
otherwise, a grid appeared. It came out ugly sometimes, but acceptable.
Looking for a quick fix, I suspected there must be a reset of some sort,
but there is not.
The {{{ {% cycle [] as var %} }}} could be a nice way to fix this. But for
starters, the output of {{{ {% cycle [] as var %} }}} should go away. "as
var" in other tags denotes a variable for '''later''' use. If we can
reference the cycle-variable on the node, we could make a {{{ {% cycle
reset var %} }}} of some sort, which would reset the cycle referenced.
--
Ticket URL: <http://code.djangoproject.com/ticket/7501#comment:8>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---