Alan Green wrote:
On 9/2/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
  
If not, should it?
    

No, it doesn't. There's good argument both for and against this
sub-templates picking up templatetag libraries from their base
templates.

  
If I'd like do have markup on my whole project it would be nice to set
it once in base.html via {% load markup %} and have it automatically
loaded in each template that extends base.
    

That's one of the arguments for.

  
I just tried this with template tags and it didn't work but I'm curious
if it would be a useful thing or not?
    

I agree that automatically loading tags that were loaded in a base
template would save a little typing and be a little more convenient.
However, the costs are:

1. it more closely ties the subtemplate to to the base template, and
2. it is less clear, from just looking at a subtemplate, where the
tags are loaded from.

Either way wouldn't make much difference to me, though the Django devs
obviously have a preference from the current behaviour.

Regards,

Alan.

  
Thanks,
Rob


    
I admit, this behavior of not carrying over loaded tags from a base template to derived template surprised me.  I would rather that they did.  If the only two "costs" are the ones Alan mentions, then that's not much cost.  Both are about human consumption of templates, and can be fixed by having the people who value those characteristics including the tags in all their templates.

I imagine there are other reasons for the current behavior.  My understanding is that back in the mists of time, the loaded tags did carry over into derived templates.

--Ned.
-- 
Ned Batchelder, http://nedbatchelder.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to