Living on the Edge

Django Templates in Javascript

Posted on February 07, 2008

Neil Roberts implemented the Django template language in JavaScript. Pretty cool stuff. Find out more at Ajaxian

Common Template Tags

Posted on August 07, 2007

I’m still enjoying the nuggets of goodness in the Django Master Class slides. I love this little tidbit:


from django import template
template.add_to_builtins(“myproject.templatetags.switchcase”)

If you have custom template tags that you want to make available in every template, put the above bit of code in a top level file that will get loaded on startup, such as __init__.py. I like it.