Monday, December 6, 2010

Distinguish between None and False/0/[] in a template?

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 %}

Thanks!
--
-- Christophe Pettus
xof@thebuild.com

--
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