On Jan 23, 2008 11:32 AM, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On Jan 22, 2008 4:15 PM, Papalagi Pakeha <[EMAIL PROTECTED]> wrote:
> > what's the reasoning behind not having and not planning to have macros
> > in django templates? they look like a very useful construct compliant
> > with DRY to me.
>
> Django's template system is meant to be a means of expressing
> presentation, not a programming language. Programmable macros are,
> well, part of a programming language, not a presentation system.

template macros are not that much about programming. it's about
bringing DRY to templates since without macros you often have to
repeat the same HTML again and again.

i'm indeed biased as in my last project we used TAL template engine
which has a decent support for macros (but many serious problems in
other areas hence i'm not keen to drop the native django template
engine in favour of TAL. yet).

i'll explore jinja a bit more. that could be the way to go.

papa

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to