Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
Use django template tag inside {{ verbatim }} and {{endverbatim}}

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?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

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.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda