Since Django 1.2 is not out yet I have been using the smart_if tag in all my projects, with one addition. Since I believe the new if tag is based on the smart_if tag code on Django Snippets, I want to propose adding the mod(%) operator to it.
Often I have display logic where I am displaying a grid of items so every nth item I need to create a new row. Right now you can awkwardly do this with the cycle tag but it gets a bit tedious and error prone if you want to have a row of 10 items. For example, you could do: {% cycle '' '' '' '' '' '' '' '' '' '<br />' %} or {% if forloop.counter % 10 %} <br /> {% endif %} -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@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.