Re: Template re-use

2007-02-22 Thread Jeremy Dunck
Sorry, bad cut and paste. On 2/22/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: ... > source, origin = loader.find_template_source('B', > dirs=['/dir/to/dynamic/a/','/dir/to/b/']) > template = loader.get_template_from_string(source, origin, 'B') > > You'd always call the parent template "A", but va

Re: Template re-use

2007-02-22 Thread Jeremy Dunck
On 2/22/07, Iwan <[EMAIL PROTECTED]> wrote: ... > > But this means that when you write B, you need to already know which > template it will extend. Yes. ... > In other words, I'd like to write B before I have any knowledge about > which other template it's going to extend. And, at run time I wa

Template re-use

2007-02-22 Thread Iwan
Hi there, I'd like to use Django's templating stuff in a project (stand alone). But I have a strange requirement... Which may be useful to others too. I was wondering if there's any way one could do it currently: Usually, in a basic scenario, you can have, say, a basic template for an entire s