On 6 December 2010 20:31, Christophe Pettus <x...@thebuild.com> wrote: > Pardon if this is a FAQ, but is there a built-in way of distinguishing > between None and the other typical false values (False/0/[]) in a template? > Something along the lines of: > > {% if var == None %} ... {% endif %} >
It's best to just try before asking if something works :) There is a filter variant too: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#default-if-none -- Łukasz Rekucki -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.