On Wed, 2009-01-28 at 18:06 -0800, Margie wrote:
> Ah, right - of course.  Thanks, Malcom.
> 
> This is only slightly related, but perhaps you have a good answer.
> Are most people using the standard template language? 

Not sure how we'd measure "most" people. But you could safely assume a
few thousand people are, at least. It's the default templating system
with Django, after all.

>  I know there
> are some others out there (though I can't remeber the names offhand).
> As a python programmer I find using the template language to be
> somewhat unintuitive.  Would like something more python-like.

The template language isn't designed to be Python-like. Or, rather, it's
intentionally designed to not allow a bunch of Python-like features. The
general rule is not to allow "programming in templates". You do all the
heavy lifting to create the bag of information you want to present in
the Python view. The templating language is a very simple description
language for dumping that bag of information into a string.

The template language is designed to be easy to learn for designers who
have to learn "yet another language". Python is not a language for
designers, so that wouldn't be a good choice. In larger organisations
using Django (including the place where it was created), the people
creating templates and the people writing Python code are quite separate
(although the former often end up learning the latter so that they can
build their own Django sites and put the rest of us to shame).

Of course, the line's a bit fuzzy as to what is simple and what isn't
and, since custom template tags and filters are both permitted and
encouraged, there's really no limit as to what you can do.

>   Of
> course, I know that it is good to keep code out of the html, so making
> it hard to use is perhaps a good thing.  But is this the template
> language that python programmers use, or is there something that folks
> like better?

I personally don't put myself into a box and label it 'Python
programmer'. I can program in Python, but I also program in other
languages, whether they be domain specific (a la Django's templating
language) or more full-featured. :-)

Use whatever templating language suits your requirements. As you note,
there are only about 183 choices out there, from full-on Python (e.g.
Cheetah) to Django-like-but-allowing-Python and everything in between.

Malcolm


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to