1

Aug

Filed in Code, Django, Jinja |

I’ve been annoyed for the last 6 months of using Jinja, as I’ve been working on numerous different Django projects, and I’ve had to use django-admin.py vs manage.py. The reason for this is simply, that in my settings.py I had used the djangosupport.configure() routine. I tried moving it to other locations, but they didn’t seem to work.

So, I’ve refactored the djangosupport module (based on some previous comments by the Pocoo team), and deprecated the magical djangosupport.configure(). You can now properly import the module via jinja.contrib.djangosupport and use all of the same methods that were available via django.contrib.jinja.

The patch also includes handler404, handler500, and direct_to_template methods.

If you’re interested, here is the diff and a matching hg bundle. You can also view the ticket on Jinja’s Trac instance.

  • http://www.dilandau.com Dilandau

    I’m planning to migrate my site to django, and I would like to use Jinja2, but it’s really hard to configure. I read your post about how to configure jinja but it doesn’t work, maybe it’s outdated. Can you write a short tutorial about the jinja2 configuration?

    Thank you, Alberto

blog comments powered by Disqus