I have template containing lot of angular tags. So I put {{ verbatim }} at top of the html and {{ endverbatim }} at bottom of the html.
Now somewhere between template I need to have one check where, I want to use django template's in-built tag.
e.g.
{% if user.group.name == "somename" %}
Is it possible to escape that check?
I faced pretty same issue, I created a new tag
from django import template
register = template.Library()
@register.simple_tag()
def no_rendering(value):
return "{{%s}}" % value
And use it as follow (mustache template)
<h3> {% trans "Question" %} {% no_rendering "j" %} </h3>
it will be produce
<h3> Question {{j}} </h3>
I'm my case using {{verbatim}} will print {% trans "Question" %} as is in the mustache template.