Opened 8 years ago

Closed 8 years ago

#9070 closed (invalid)

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

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: UI/UX:

Description (last modified by adrian)

Ive tried the columnize tag ( in my template. Everything works if I use it in one template file:


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

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

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


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

I've 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. ( of ColumnizeNode will not be called)

Change History (2)

comment:1 Changed 8 years ago by adrian

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

(Fixed formatting in description.)

comment:2 Changed 8 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed

This isn't a bug with Django. Anybody can contribute pages to the wiki and we can't effectively maintain them if people don't keep them up to date. Unfortunately, they aren't marked with who contributed them always.

So there's nothing we can really do here. This looks to be a bug in the implementation of that tag, not a bug in Django itself.

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