djangosnippets.org: Latest snippets tagged with 'contains'https://djangosnippets.org/tags/contains/2010-12-16T04:25:50.283686-06:00is_in
2010-12-16T04:25:50.283686-06:00Tomekhttps://djangosnippets.org/snippets/2292/<p>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.
</p>
Freely redistributableoracle 10g fulltext search & patch nclob field limitations
2008-04-05T02:59:10.828795-05:00ageldamahttps://djangosnippets.org/snippets/685/<p>save as some module,
import then, call 'patch()' in somewhere suchs urls.py...</p>
Freely redistributablein_list filter
2007-08-22T09:03:32.882200-05:00guychihttps://djangosnippets.org/snippets/379/<pre><code>which you would use like this:
The item is
{% if item|in_list:list %}
in list
{% else %}
not in list
{% endif %}
</code></pre>
Freely redistributable"If in" templatetag
2007-04-13T13:44:45.746187-05:00bitprophethttps://djangosnippets.org/snippets/177/<p>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 %}.</p>
Freely redistributable