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

313
Visualizações
Error in included django template is not rendered

I have this simple template that uses the imgix plugin like so:

// template_b.html
{% get_imgix project.picture %} 

This line causes an error and should be replaced by

{% get_imgix project.picture.url %}

This piece of code is inside a template that is included:

// template_a.html
{% include "template_b.html" %}

It seems that when the template tags fails, in the first case (an AttributeError is raised), the template is simply ignored. No error is raised if the DEBUG setting is False.

While this is certainly useful to prevent any user-facing errors, it's still concerning to not have any kind of feedback.

Do you know where I can find more information related to this behavior and if there are ways to still be informed of the failure?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You're not the only person to have been caught out from this behaviour. See this discussion on the django-developers mailing list.

The silencing behaviour has been deprecated in Django 1.11. In Django 2.1 the exception will be raised. In Django 1.11 and 2.0 you get a deprecation warning if the include tag raises and exception, but the exception is silenced.

I don't have any good suggestions for earlier versions of Django. You could create your own include tag if it's really important to you.

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