#9070: the value of parse_until will be overwritten when using a block in a loop of {%include%} ---------------------------------------------------+------------------------ Reporter: ledil <[EMAIL PROTECTED]> | Owner: nobody Status: new | Milestone: Component: Template system | Version: 0.96 Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by adrian):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Old 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) New 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 %} }}} 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. (__init__.py of ColumnizeNode will not be called) Comment: (Fixed formatting in description.) -- Ticket URL: <http://code.djangoproject.com/ticket/9070#comment:1> 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 django-updates@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---