is_in
I know in Django 1.2 we may acquire the same result using {% if value in arg %} but I need this filter in Django 1.1.
- template
- filter
- django
- contains
- in
- is
I know in Django 1.2 we may acquire the same result using {% if value in arg %} but I need this filter in Django 1.1.
save as some module, import then, call 'patch()' in somewhere suchs urls.py...
which you would use like this: The item is {% if item|in_list:list %} in list {% else %} not in list {% endif %}
It's been a while, but I think I made this by copying and pasting the default {% if %} tag and modifying it. Does what it says, lets you test for inclusion in a list, in templates, like so: {% ifin item list %}.
4 snippets posted so far.