#15053: Make templates more reusable by Improving template loading algorithm to
avoid extending infinite recursion
---------------------------------+----------------------------------------
Reporter: pmartin | Owner: unaizalakain
Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Comment (by prestontimmons):
I found some interesting behavior while working on the debug messages.
Currently, the debug view is coupled to django.template.loader. To
generate a post-mortem, it loops through the loaders and calls their
get_template_sources api. This means there is no post-mortem output for
the cached or egg loader. Further, the post-mortem status messages assumes
the return values are filesystem paths.
I think we can do better than this. The information used in the post-
mortem is already available in Loader.get_template. I'm going to see if we
can pass that through instead as an attribute of TemplateDoesNotExist,
rather than recalculating it. This would remove the coupling and fix
things for the egg and cached loader.
--
Ticket URL: <https://code.djangoproject.com/ticket/15053#comment:47>
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/065.c5bda43b3540949fb3fba46832dce410%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.