in_list filter
which you would use like this: The item is {% if item|in_list:list %} in list {% else %} not in list {% endif %}
- template
- filter
- lists
- tag
- contains
- in
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 %}.
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...