On Feb 27, 1:01 pm, Tobia <tobia.confo...@gruppo4.eu> wrote: > After reading all the above, I can see the arguments against this: > > <div class="inline-related{# > #}{% if forloop.last %}{# > #} empty-form last-related{# > #}{% endif %}{# > #}" id="{{ > ... > > or even this: > > <div class="inline-related{% > if forloop.last > %} empty-form last-related{% > endif > %}" id="{{ > ... > > Ugh!!
Agreed. Seeing that just changed me from +1 to -0 for multiline tags. Although the multi-line comment syntax isn't that bad, it is at least clear what it does and why. Now that I look at it, the main problem is that you want the <div> appear to be on one line in the HTML. So, it should be one-liner in the template too, or otherwise it will look strange. However, dealing with div tags isn't the hard case, it is the email template. Django doesn't have a good answer for that. Multi-variable include/with/ blocktrans tags are a problem too. When reading the latest template-related threads on this list it is pretty clear that there is no right answer for template design philosophy questions. For example I use mainly Jinja2 for two reasons. I need to generate largish reports, and Jinja2 beats Django's template engine in performance by an order of magnitude. In addition, Jinja's design philosophy fits my needs better than Django's. But, I do not claim Jinja2 is the right answer for everybody. We will just need to accept that it is impossible to create a template language that fits everybody's needs perfectly. If you want something different, use something different. I think good ideas how to make life easier for external template engine users are welcome. - Anssi -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.