You are writing a comment about Replacing Django's Template Language With Jinja2, here is a quick summary:
The first example in the Loosely Coupled Django series, this entry looks at replacing Django's template language with the freshly released Jinja2 template language.
You are responding to this comment written by James on July 22nd 2008, 12:56.
hi will,
many thanks to this entry! I really love django and jinja2 and now I can use both of them. Thanks for showing it how. I have some questions though...
in the settings.py
TEMPLATE_DIRS = ( os.path.join(ROOT_PATH,'templates'), os.path.join(ROOT_PATH,'with_jinja/templates'), )
then we have
template_dirs = getattr(settings,'TEMPLATE_DIRS') default_mimetype = gettattr(settings, 'DEFAULT_CONTENT_TYPE') env = Environment(loader=FileSystemLoader(template_dirs))
the template is save in with_jinja/templates/with_jinja ... Does this mean that django can find template on sub directory?
Thanks
Please be aware that comment forms go stale after one hour.
Comments may make use of LifeFlow MarkDown. Raw html will be escaped.
Quick Introduction to LifeFlow MarkDown Syntax
A highlighted code block:
Other common languages work as well: scheme, python, java, html, etc.
Other markdown syntax: