Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting. Both are great frameworks. My thoughts are:

I like how django lacks all that directory structure and you can easily use a single file for your models.

Django templates are way more powerful and safer than erb / haml, etc.

I wish there was a port of django templates in ruby. If so my preferred environment would be sinatra + datamapper + django templates.



http://ruty.rubyforge.org/

Ruty hasn't really been maintained, but it is pretty close to Django's templating system. Apparently, there's even been a little work to get it together with Sinatra (http://github.com/eladmeidar/sinatra-mvc/blob/master/app/hel...). I haven't used Sinatra, but I have played with Ruty and it's pretty nice and supports things like Django-style inheritance. It's a pity it never took off and this isn't a complete answer to your desire, but it might be an interesting place to look around.


oh very cool thanks for the link.


There's also mustache (http://github.com/defunkt/mustache) which has some similarities to django templates and is pretty popular.

"safer than erb / haml, etc"

Are you are referring to auto-escaping strings? If so, in Rails 3, this is on by default, and for Haml without Rails it's a simple setting.


I use Mustache and like it very much, only I find that I wish it offered support for a few of the features in Django templates such as dot notation.

I was referring to the auto-escaping as well as to the inability to run arbitrary code inside a template (for all I know this feature is added to the newest versions, though)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: