#24265: jinja2 template backend results in KeyError
-------------------------------------+-------------------------------------
     Reporter:  robhudson            |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  assigned
    Component:  Template system      |                  Version:  1.8alpha1
     Severity:  Normal               |               Resolution:
     Keywords:  multiple-template-   |             Triage Stage:  Accepted
  engines 1.8-beta                   |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/4058 PR 4058] proposes two changes
 related to this issue.

 After the first commit, Django's debug page reports the `ImportError`
 correctly instead of crashing in `get_traceback_data()`.

 That's a worthwhile improvement in itself. The debug page must be
 extremely robust. The multiple template engines refactor made it
 vulnerable to exceptions raised in `Engine.get_default`. However that
 commit addresses the symptoms rather than the root cause.

 The second commit ensures that Django keeps raising the same exceptions
 when importing or initializing a template backends fails. For extra
 safety, I added one test for each case.

--
Ticket URL: <https://code.djangoproject.com/ticket/24265#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e6475dc73de81b176882e8a1613771d5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to