On Jan 22, 2008 5:15 PM, Papalagi Pakeha <[EMAIL PROTECTED]> wrote:

>
> On Jan 23, 2008 4:08 AM, James Bennett <[EMAIL PROTECTED]> wrote:
> >
> > On Jan 21, 2008 8:30 PM, Papalagi Pakeha <[EMAIL PROTECTED]>
> wrote:
> > > i wonder if there is any way to have Macros in django templates
> > > similar to what Jinja has (http://jinja.pocoo.org/)?
> >
> > No.
> >
> > The Jinja project was started specifically to add additional
> > programming constructs that the Django template system does not and
> > likely will not implement.
>
> 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.
>

Check out the Philosophy box here:

http://www.djangoproject.com/documentation/templates/

Also the introductory information here:

http://www.djangobook.com/en/1.0/chapter04/

provides the gist of the reasoning.  Net is template designers shouldn't
have to be able to understand programming, and any real programming-type
things you want to do in a template are probably better done in the view or
a custom template tag/filter.  It's not a philosophy everyone agrees with
(Jinja creators, for example, feel this is unnecessarily constraining on
template designers), but it is one that the Django devs try to stick to
pretty consistently.

Karen

--~--~---------~--~----~------------~-------~--~----~
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