Excuse me for my awful english ;) On May 13, 7:33 pm, "richardcur...@googlemail.com" <richardcur...@googlemail.com> wrote: > Can I do in Django 0.9 something like if number <= othernumber ?
Try to create your own filter that compares things (numbers as a case) In that particular case when you want to check a length of a list, you can use this: {% if list|slice:"5:"|length_is:"0" %} some HTML when the list is short {% else %} some HTML when the list is long {% end if %} This example tests if list is longer than 5 items or not. Use another number if you need. Bests! --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---