- preprocess inheritance. (one important incompatibility: {% extend
"..." %} should only get a string as parameter, not a variable! But
honestly, I really don't know why someone would do that.

For the record - we do!

We don't have a core site base template. Each client on our system gets their own, as IA/branding etc. varies considerably (and indeed includes chunks of markup that the client supplies directly).

However, the 'content' views are all actually the same between clients. We therefore simply vary the base template depending on the domain of the incoming request; the base template to use while rendering a given template is put in the template's context. We have a couple of 'well-known blocks' (eg. {% content %}) which child templates can provide.

This lets us write a single set of views with a single set of templates that work across all clients. We don't have to write 'child' templates for every view for every client which pull in the right base template for that client. We simply implement a base template for that client, with that client's custom markup, and we're good to go.

There are other possible implementations, of course; but it turned out that being able to determine the base template dynamically solved our problem pretty elegantly.

Put a feature in, and someone, somewhere will be using it :)

Cheers,
Dan
--
Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to