Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

312
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!