Opened 16 years ago

Last modified 16 years ago

#9070 closed

the value of parse_until will be overwritten when using a block in a loop of {%include%} — at Initial Version

Reported by: ledil <leonardo@…> Owned by: nobody
Component: Template system Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Ive tried the columnize tag (http://code.djangoproject.com/wiki/ColumnizeTag) in my template. Everything works if I use it in one template file:

#mytemplate.html

{% load columnize %}
{% for item in items %}
{%columnize 13%}
<img src="{{item.src}}"/>
{%endcolumnize%}
{% endfor %}

But the problem is when I put the stuff in the {%for%}-loop in an external template file like this:

#myinternalloop.html
{% load columnize %}
{% columnize 13%}
<img src="{{item.src}}"/>
{% endcolumnize%}

#mytemplate.html

{% for item in items %}
{% include "myinternalloop.html" %}
{% endfor %}

Ive tried to debug and it seems that "parse_until" seems to lose {%endcolumnize%} and this results in that columnize will never start again when traversing a new item. It will continue there where it stops on the previous item. (init.py of ColumnizeNode will not be called)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top