Re: Self-referenced template recursion handling

2013-12-08 Thread unai
Hello, > I tend to warn people off thinking of template names as paths. It's > an implementation detail that they are treated as such by the two > default loaders. > Requiring each loader to include an unique id with each template > (even if it's just a full path) seems the easiest solution. > O

Re: Self-referenced template recursion handling

2013-12-08 Thread Curtis Maloney
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

Re: Self-referenced template recursion handling

2013-12-08 Thread Alex Hill
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:

Re: Self-referenced template recursion handling

2013-12-08 Thread unai
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 te

Re: Self-referenced template recursion handling

2013-12-08 Thread Pantelis Petridis
Hello, given this approach, what if the third party app wants to self-extend a django admin template for example? The application should provide a separate template directory and force users load it in their TEMPLATE_DIRS. Then what happens if the developer wants to self-extend that third p

Re: Self-referenced template recursion handling

2013-12-08 Thread J . Pablo Martín Cobos
2013/12/8 Jonathan Slenders > Do we ever intend to implement something like collect_templates in the > future? Similar to collect_static? > I think that for this reason exists the cache template loader, it is something similar. With this template loader every template is only compiled one time.

Re: Self-referenced template recursion handling

2013-12-08 Thread J . Pablo Martín Cobos
2013/12/7 Florian Apolloner > Hi, > > there is no need to convince us that this feature would be nice to have; > the ticket is accepted… > Yes this ticket is accepted, but this is accepted from 3 years ago... I think that everybody knows that the current solution needs to improve in the self-re

Re: Self-referenced template recursion handling

2013-12-08 Thread Jonathan Slenders
Do we ever intend to implement something like collect_templates in the future? Similar to collect_static? If so, implementing this would break collect_templates or the similarity that we currently have in how app directories are processed. This is actually the monkey-patching way of writing templ