I have setup a custom template tag (simple_tag) (using https://stackoverflow.com/a/7716141/1369798) with a definition like this:
templatetags/polls_extras.py
def settings_value(name)
which I am able to use in my template like this:
templates/index.html
{% settings_value "ALLOWED_BOOL" %}
But this just inserts the text into my HTML output.
What is the syntax to use my template tag with parameter in an {% if %}?
I tried this but I get the error: TemplateSyntaxError at / Unused '"ALLOWED_BOOL"' at end of if expression.
templates/index.html
{% if settings_value ALLOWED_BOOL %}
You are allowed.
{% endif %}