Using Jinja2 Templates in Django
This is a useful link Upgrading to Jinja2 Templates in Django 1.8 With Admin - jonathanchu.is
I managed to get this set up with the "northrose" project. Use that as reference.
|
+- jinja2/ << where I ultimately placed the jinja2 templates. It didn't work as documented under "templates"
|
+- mydjangoproject/
|
+- jinja.py << aliases for "url" and "static" defined here
+- settings.py << jinja2 processor and environment set
TODO: document getting supporting url and static tags from Django templates.
Django convention: {% url "view-details" arg1 arg2 %}
Jinja2 convention: {{ url("view-details", args=[arg1, arg2, ]) }}, this is really an alias for Django's reverse() method, enclosed as a variable instead of as a tag.