[Answer]-Make tag as variable for using in if::else in Django Template

1👍

Make a {% if_match_url "^/about" %}...{% endif %} template tag that does what you want.

The template language is intentionally limited, to make sure you don’t put too much magic in your templates. People will tell you to do this stuff in view instead of template.

Leave a comment