On Nov 21, 9:31 am, Rock <
r...@rockhoward.com> wrote:
> This discussion has been useful. I can see why Doug is concerned about
> the additional loaderas it will make some his future plans for plugin
> points trickier to realize. (Personally I am not convinced yet that
> plug-in points is the right way to go for granting that kind of
> personal layout flexibility, but I admit it is interesting stuff.)
I don't see how it will cause any problems for the plugins.
The plugins just use a basic template lookup. If this is something
which causes problems for template lookups to the point where every
third party developer must be aware of or use the custom template
loader (which I did not think is the case) then there is a major
problem in general.
I think you are missing the point here, in that there should not be
any reason to have a custom template loader for doing basic block
operations. If you do, then there is something wrong with your
templates.
> Jannis makes a good point and that has refined my vision a bit.
> Instead of having the custom loader look inside the app for a pinax
> template area, maybe this area should be inside the pinax project.
> This would work pretty much identically.
>
> As to benefits, here is one I hadn't pondered at first. When
> installing the Pinax project the project's main template area would
> only contain base, site_base, 400, 500 and homepage. All of the app
> specific Pinax templates included in the project would be elsewhere.
> Only overrides by the developer using Pinax would be in the main
> template area. That could make life much better for the Pinax
> developer.
I dont see why you need a custom template loader to achieve this. This
is how PyCon-Tech has worked sense day 1.
I have a local Pinax project and it has 6 templates at the project
level, with the rest pushed to the apps.
> I should also state in this thread that over half of the problems that
> Pinax has with 3rd party templates is due to the unconventional use of
> blocks in the Pinax base templates. See Holscher's latest blog post athttp://
ericholscher.com/blog/2008/nov/20/gentlemans-agreement-django-...
> for a first attempt at defining some conventions that would reduce
> "template friction" for everyone.
I would claim that _ALL_ the problems are with not understanding how
to properly use blocks, templates, includes, and extensions.
There is no reason to have a custom template loader like this, if
there was a need for it it would be part of core django.
-Doug