On Sep 18, 12:52 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-09-17 at 14:42 +0100, Ben Ford wrote: > Parts of it are very well thought out and if it had been a post on "how > Jinja works" it would have been excellent. Other parts are completely > unconstrained by facts or acknowledgement that Django's standard > templates and Jinja's ones have different goals (which is important, > since this isn't an apples to apples comparison at all). I'm starting to feel like Don Quixote here (the Windmills being a community that learned to live with the implications of the limitations of their beloved template engine). After my blog post I continued to dig in the Django sources and had to notice that it's impossible to reused Template objects at all so you are pretty much forced to reparse them over and over again. (Not reparsing would for example also break the FilterExpression embedded i18n support because it translates on compilation, not on resolving)
With that in mind you can pretty much everything said about thread safety in my blog post. The rest of my reply is missing now. I actually wrote a mail here that was a lot longer than my blog post from yesterday but noticed that I repeated myself with slightly different examples. I don't want to start the discussions again because I know the first reply will be again that missing support for expressions is good, that the AST evaluator is a blessing and in general the Django template engine is the best ever happened to mankind. I know I'm sort of exaggerating here but in general that's what I read out of the comments I've seen on the reddit discussion thread about that topic. Please apologise my blog post, it wasn't meant to criticise the Django template engine concept in any way, just to inspire a possible improved version of Django templates. I think Jinja does solve a few things better than Django (and probably some worse) but I can't be a mistake to look at how things work there to get an inspiration of how to make things better. The primary inspiration for myself for Jinja was Django, and I'm not ashamed to say that. When I started developing Jinja it was a simple port of the concept into a standalone library not depending on Django with unicode support. What you can see now in Jinja2 is the second iteration of a vastly changed template engine, that however is still based on the same principles the Django template engine is: no XML, template designer friendly, easy to get started, extensible. If I can help out in any way to get some of the Jinja concepts ported to Django, or just explain why things work that way and not different in detail I would love to do so. I think Django can't lose, it just takes someone to have a look at it. Regards, Armin --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---