Hi all,

If anybody's interested in some background reading, there is an 
implementation of this in Mezzanine, using an "overextends" tag.

https://github.com/stephenmcd/mezzanine/blob/1.4.16/mezzanine/template/loader_tags.py

Cheers,
Alex

On Sunday, December 8, 2013 11:08:12 PM UTC+8, unai wrote:
>
> Hello, 
>
> > given this approach, what if the third party app wants to self-extend 
> > a django admin template for example? 
>
> I'm working on an other solution that instead of relying on loader 
> skipping 
> relies on template skipping. 
>
> Imagine you extend to a self-reference from within a template. All the 
> templates are ignored until the very same template is skipped and it then 
> continues normally. 
>
> This allows for apps to extend other apps and for filesystem templates to 
> extend other TEMPLATE_DIR roots while order is respected. 
>
> Now, the tricky part is to identify a template uniquely. I went for 
> hashing 
> but, as Apollo13 said on IRC, that's just too expensive. After looking for 
> a 
> while, it seems that both filesystem and app loaders work with absolute 
> paths. 
> It seems to me the best way to identify a template uniquely. 
>
> The beauty of the solution is that template skipping is totally relegated 
> to 
> app and filesystem loaders. Of course, some changes in 
> django.template.loader 
> are needed but they are minor. 
>
> I'm currently having some debugging issues and I'm quite busy with other 
> things 
> but I'll try to provide a complete PR this following week. 
>
> If you can think of any problems that this solution would arise don't 
> hesitate 
> in telling ;) 
>
>
> Best wishes, 
>
> Unai Zalakain 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4ad4b787-7182-4cd2-872c-d84343b6ab9b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to