Sunday, October 23, 2011

Re: How to filter arithmetic seires in loop?

Thanks your advice!
However,using {% if forloop.counter % 4 == 1 %} shows problem that
Exception Value:
Could not parse the remainder: '%' from '%'
Now, I refer http://stackoverflow.com/questions/1438486/how-to-use-math-remainder-in-django-template
and change it to {%forloop.counter|add:"-1"|divisibleby:4%}, and it
work!

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate