djangosnippets.org: Latest snippets posted by doniyorhttps://djangosnippets.org/users/doniyor/2014-09-04T14:28:40.711402-05:00doniyorcustom template filter to check if list contains any non-empty element
2014-09-04T14:28:40.711402-05:00doniyorhttps://djangosnippets.org/snippets/3092/<p>in template: </p>
<p>{% if not list|seeany %}
list empty
{% else %}</p>
Freely redistributableHighlight matched search term
2014-05-13T16:55:02.434665-05:00doniyorhttps://djangosnippets.org/snippets/3049/<p>sterm is the search term. text is the result search text. </p>
<p>it will highlight every matched search term in search result. please define your own .yellow css class. </p>
<p>use: </p>
<p>{{search_result_var|highlight:search_term}}</p>
Freely redistributable