djangosnippets.org: Latest snippets tagged with 'smart-if'https://djangosnippets.org/tags/smart-if/2009-03-02T20:46:53.783545-06:00Smart {% if %} template tag
2009-03-02T20:46:53.783545-06:00SmileyChrishttps://djangosnippets.org/snippets/1350/<p>Save this as <code>smart_if.py</code> in the <code>templatetags</code> folder of one of your apps. Then a simple <code>{% load smart_if %}</code> replaces the boring built-in Django <code>{% if %}</code> template with the new smart one.</p>
<p><em>7 May 2009</em>: Was asked about whether it handles combination of and/or. It does, added …</p>
Freely redistributable