On Mon, Mar 24, 2008 at 2:12 PM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Unfortunately, I can't do the mod (%) in the if statement, as it's not valid > syntax. Is there a way around this, or a simpler solution?
The first thing to do is to step back and remember that the Django template language is not Python; completely forgetting Python syntax is a good first step to writing effective templates, because making assumptions that some bit of syntax will or won't work will get you in trouble. The second thing to do is to read the template documentation to see what is available, because doing so will turn up things like this: http://www.djangoproject.com/documentation/templates/#divisibleby -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---