Hey @carltongibson
Hope you are doing great !
I was summarizing the coming of template-partials
into django when a question just struck me. Why can’t we directly use Template
class (the one from base.py
) in place of TemplateProxy
. 'Cause TemplateProxy
seemed of use when we use partials as a third-party library.
But if we are getting this inside django, why not use Template
directly ?
So, I did some go-through and it’s actually of use.
First of all, the instrumented test rendering issue will get solved and there won’t be a need to separately get the template_rendered
flag triggered.
Second, this would allow each partial to have it’s own source
and get_exception_info
(could be separate or same as that of parent template
depending on the implementation complexity )
Also, this would ease the partial
to be used separately using some_file#partial
.
And Template
already has a _render
method, so it will be used with django-components
without trouble.
I could be going in the wrong direction. Please correct me if so.