Check if a template tag is loaded in Django
Posted
by Sævar
on Stack Overflow
See other posts from Stack Overflow
or by Sævar
Published on 2010-03-17T09:17:02Z
Indexed on
2010/03/17
9:21 UTC
Read the original article
Hit count: 296
Is there a way to check if a template tag exists before using the template tag?
In other words, I would like to be able to do something like this:
{% load my_custom_tags %}
...
{% ifloaded my_custom_tags %}
{% some_custom_tag %}
{% endifloaded %}
© Stack Overflow or respective owner