Live data from Hacker News

Introducing Nemo: A Pythonic Haml

github.com

1–10 of 19 posts

Re: Introducing Nemo: A Pythonic Haml

#2
I should probably mention. Nemo is built on top of Mako, so there's a tiny speed bump for Nemo processing then its as fast as Mako once the templates are compiled and cached.

Mako is faster than Django templates--at least by a factor of 4--and in the neighborhood of speed with Cheetah. Only Spitfire templates are faster.

This is important for any app that is CPU bound due to rendering speed.

Re: Introducing Nemo: A Pythonic Haml

#6
post #5

I've been contributing to another HAML derivitive for python called HamlPy ( https://github.com/jessemiller/HamlPy ). It compiles down to Django templates, which made it very easy for me to convert my existing project. It's under pretty active development right now.

I forked that project and made it compile down to a Mako template (I use pylons). https://github.com/raineri/MakoHaml :)

Re: Introducing Nemo: A Pythonic Haml

#8
post #6
post #5

I've been contributing to another HAML derivitive for python called HamlPy ( https://github.com/jessemiller/HamlPy ). It compiles down to Django templates, which made it very easy for me to convert my existing project. It's under pretty active development right now.

I forked that project and made it compile down to a Mako template (I use pylons). https://github.com/raineri/MakoHaml :)

You might want to update your readme file so everyone knows that it compiles down to Mako just at a glance.

Right now its confusing.

But if I'd known about this project a few days ago, you'd have definitely been added to my list of Muses.

Also, does your fork support the full range of Mako control structures? Looking at the nodes.py it seems that its still targeted towards a Django-templates backend.

Re: Introducing Nemo: A Pythonic Haml

#9
post #6

Earlier quoted context omitted.

I forked that project and made it compile down to a Mako template (I use pylons). https://github.com/raineri/MakoHaml :)

You might want to update your readme file so everyone knows that it compiles down to Mako just at a glance. Right now its confusing. But if I'd known about this project a few days ago, you'd have definitely been added to my list of Muses. Also, does your fork support the full range of Mako control structures? Looking at the nodes.py it seems that its still targeted towards a Django-templates backend.

Yeah, I quickly hacked it together, I will update the readme soon. It does support the mako control structures. You see them rendered around line 200 in nodes.py.

Re: Introducing Nemo: A Pythonic Haml

#10
post #5

I've been contributing to another HAML derivitive for python called HamlPy ( https://github.com/jessemiller/HamlPy ). It compiles down to Django templates, which made it very easy for me to convert my existing project. It's under pretty active development right now.

You can actually use Nemo alongside Django-templates.

It registers a Mako template loader with Django, that by default points to your /templates directory in your folder.

However you can override it by modifying MAKO_TEMPLATE_DIRS in your settings.py. MAKO_TEMPLATE_DIRS is just a tuple containing the directories to look under for Mako/Nemo files.

My full project runs under Mako, but 3rd party apps, and the django admin run with django-templates.

Post reply on HN