Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda