You can implement has_applied as a filter instead of a template tag.
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters
Haven't check it, but something like {% if user|has_applied_filter: opening
%} should essentially work out for your case.
Another alternative could be use of assignment
tags<https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#assignment-tags>.
>From documentation "This function works the same way as
simple_tag<https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags-simple-tags>,
except that it stores the tag’s result in a specified context variable
instead of directly outputting it.".
Regards,
Alagappan R
Twitter: @_alagappan <https://www.twitter.com/_alagappan>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.