Does example.html print the data in `item` and if so, why not make the loop in example.html and just use include one time in your "main" template?
Concerning your actual question. Even if it's cached it seems like bad practice to me so I would avoid using this method but without more info about what example.html holds it's hard to say. On 21 May 12:40, paul wrote: > > sorry -- I made a mistake -- I meant include instead of extends :-p > > {% for item in items %} > {% include "example.html" %} > {% endfor %} > > does example.html get opened for every iteration of the loop, or just > at the first iteration, and then perhaps cached? > > > On May 21, 12:36 am, paul <phart...@gmail.com> wrote: > > hi -- given this example template: > > > > {% for item in items %} > > {% extends "example.html" %} > > {% endfor %} > > > > When this block is evaluated during template rendering, does the file > > "example.html" get opened for every iteration of the loop, or might > > the contents of "example.html" get cached the first time it's opened? > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.