Hello, I'm new to DJango, but I'm already lovin' it. I have a few questions however - can someone offer any guidance, please?
Is the possible following in a template: { inherits ... } {% for item in items %} {% block A %} some text here {% endblock A %} {% block B %} some other text here {% endblock %} {% endfor %} without there being another block wrapping the for loop? I've tried it and I cannot get it working, but I think I remember some an example doing so... I guess the general point of my question is - do all constructs have to be wrapped in a block? Secondly, with {{ super }}, if I had the following in my base template.. {% block Z %} TITLE: {% block A %} {% endblock A %} DESC: {% block B %} {% endblock B %} THE END {% endblock Z %} and used an inheriting template thus, where there was only 1 item: { inherits ... } {% block Z %} {% for item in items %} {{ block.super }} {% block A %} some text here {% endblock A %} {{ block.super }} {% block B %} some other text here {% endblock %} {{ block.super }} {% endfor %} {% endblock Z %} would I get something like.. TITLE: this is my only item DESC: a test item it is THE END It may sound mad, but my experiments (under not so ideal conditions) led me to think that super takes the gap *between* blocks, if you see what I mean, as opposed to ignoring inner blocks and returning *everything* in block Z. But I was having other issues and I could be wrong? Apologies if these questions seem silly or obscure, I'm probably trying to sprint before I can walk.. Many thanks, Mobeus. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---