[Answer]-Compare Django template variable with template tag

1👍

You can use this templatetag snippet to capture the output of any tag.

With the above added to a templatetag lib in one of your apps, and loaded, you can do this:

{% captureas admin_url %}{% url "admin:index" %}{% endcaptureas %}
{% if request.get_full_path == admin_url %}

Leave a comment