kg - Nothing special about it I don't like, it's just that I find the
HAML/GHRML
syntax very clean and readable. It's a matter of taste, I suppose :)

Emm - I've looked at Mako, though it doesn't look too far off from
normal
template HTML **at first glance** (I'm sure I've barely skimmed the
surface).

I've played a bit with GHRML and saw the problems you were talking
about with
render_to_response. This was a relatively easy fix (I'm no expert). I
just
used this in my views and settings:

# views.py ###########################################
from django.shortcuts import render_to_response as render_normal
## import ghrml
from ghrml.ghrml_django import render_to_response as render_ghrml

def hello_normal(request):
     name = 'django template'
     return render_normal('normal.html', { 'name' : name })

def hello_ghrml(request):
     name = 'ghrml template'
     return render_ghrml('ghrml.html', { 'name' : name })

# settings.py ###########################################

import os.path
TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(__file__), 'templates').replace('\
\','/'),
)

# add the ganshi templates path
GENSHI_TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(__file__), 'temp').replace('\\','/'),
)

This is basically all the necessary configuration (other than
installing ghrml),
and I was able to use both template languages in my views.

Haml has gathered quite a crowd in the RoR community, and from
personal
experience it's well worth the hype. If I figure out more stuff with
GHRML,
I'll post to this thread.

Thanks!

> You need to be aware, though, that if you choose a different template
> language, this will mean that you will have to call a different
> render_to_response/render_to_string. Which means, in particular, that if you
> want to use a third-party application which has its own views, you'll probably
> end up having to rewrite the views so that it can find your layout, for
> instance. Same for apps with their own tag library (like django-compress).
>
> Cheers,
>
> Emm
--~--~---------~--~----~------------~-------~--~----~
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