#15053: Make templates more reusable by Improving template loading algorithm to
avoid extending infinite recursion
---------------------------------+------------------------------------
Reporter: pmartin | Owner: nobody
Type: New feature | Status: reopened
Component: Template system | Version: 1.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by akaariai):
* needs_docs: 0 => 1
Comment:
To move this patch forward the patch would need some comments. Currently
you need to do some reverse engineering to understand the patch. In
addition this needs tests and possibly some doc changes along the lines of
"When extending a template the currently used template is skipped. This
allows to extend a template which has same path as the currently used
template. This is useful when...".
I trust there is no use case for extending "self" currently - it leads
always to infinite recursion and thus there is no backwards compatibility
issues here. What if the extended template name is a variable? It probably
is impossible to change that variable, and there is still infinite
recursion.
I haven't done the reverse engineering mentioned above, so it might be the
current approach as whole isn't correct.
--
Ticket URL: <https://code.djangoproject.com/ticket/15053#comment:14>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.