#24338: {%extends%}-ing a file-based template object is broken by deprecation
path
indirection
---------------------------------+--------------------------------------
Reporter: spectras | Owner: nobody
Type: Uncategorized | Status: new
Component: Template system | Version: 1.8alpha1
Severity: Normal | Resolution:
Keywords: template | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by aaugustin):
There's at least the possibility to improve the documentation.
If you control of configured template engines, you can do:
{{{
from django.template import engines
from django.views.generic.base import TemplateView
class MyView(TemplateView):
template_name = "mytemplate.html"
def get_context_data(self, **kwargs):
kwargs['parent_template'] =
engines['django'].get_template('parent.html')
return super(MyView, self).get_context_data(**kwargs)
}}}
Perhaps we should include the same hack as in `inclusion_tag`:
https://github.com/django/django/blob/4ea43ac9/django/template/base.py#L1269-L1270
I don't think option 2 would work. How could a Django template extend,
say, a Genshi template?
--
Ticket URL: <https://code.djangoproject.com/ticket/24338#comment:3>
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/066.22a7c9c43ef9e86402f9ceb189853fef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.