Re: Template Compilation

2011-03-29 Thread Jonathan S
Maybe. We solved that use-case by adding another custom directory to TEMPLATE_DIRS when we had to override the base template. But I can imagine that someone wants to be able to dynamically change the base template, from inside a view or context processor. This was a choice we made, because almost

Re: Template Compilation

2011-03-28 Thread Jacob Kaplan-Moss
On Mon, Mar 28, 2011 at 11:04 AM, Dan Fairs wrote: > 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). ... and congratulations, you've successfull

Re: Template Compilation

2011-03-28 Thread Dan Fairs
- 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

Re: Template Compilation

2011-03-28 Thread Jonathan S
Hi all, I have also been working for about a year on such a template compiler, and recently published it on Github. You may be interested in this project: https://github.com/citylive/django-template-preprocessor ** Short summary of what already is possible, and what still needs to be done: The

Re: Template Compilation

2011-03-28 Thread akaariai
On Mar 27, 5:48 am, "G.Boutsioukis" wrote: > Hi, I'm thinking about submitting a proposal for template compilation > and I'm posting this as a request for more info. > > In particular, I remember this project being discussed last year and I > pretty much assumed that Alex Gaynor's proposal would h

Re: Template Compilation

2010-03-05 Thread Alex Gaynor
On Fri, Mar 5, 2010 at 2:54 PM, Jonathan S wrote: > Just a few thoughts, this is my idea and I'm not an expert at > compilers, so forgive me if I'm somewhere wrong. > > (1) For me, personally, I think the scoping of variables should be > kept inside a block. > > {% with "x" as x %} > {% with "y" a

Re: Template Compilation

2010-03-05 Thread Jonathan S
Just a few thoughts, this is my idea and I'm not an expert at compilers, so forgive me if I'm somewhere wrong. (1) For me, personally, I think the scoping of variables should be kept inside a block. {% with "x" as x %} {% with "y" as x %} {% endwith %} {{ x }} - you would print "y", because

Re: Template Compilation

2010-03-04 Thread Alex Gaynor
On Thu, Mar 4, 2010 at 8:01 PM, SmileyChris wrote: > Would whitespace handling be identical to the current template system? > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-develop...@goog

Re: Template Compilation

2010-03-04 Thread SmileyChris
Would whitespace handling be identical to the current template system? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to d