On Oct 27, 10:36 pm, "Alfredo Alessandrini" <[EMAIL PROTECTED]> wrote: > There is a method for write this, without write a loop: > > {% ifequal apple.number <20 %} > .................. > {% endifequal %} > > Alfredo
On Oct 27, 11:52 pm, "R. Gorman" <[EMAIL PROTECTED]> wrote: > You would probably be better off writing a custom template tag (http:// > docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom- > template-tags). > > R. Actually a filter would be easier. A filter can return True or False, so you would just do def islessthan(var1, var2): return var1<var2 and in the template: {% if apple.number|islessthan:20 %} -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---