From: Armin Ronacher Date: Thu, 22 Mar 2007 09:24:00 +0000 (+0100) Subject: [svn] update on webpage and docs X-Git-Tag: 2.0rc1~406 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6ec1b7e8e36da9dfcc9be19652f13743ebe8fa04;p=jinja2.git [svn] update on webpage and docs --HG-- branch : trunk --- diff --git a/docs/src/loaders.txt b/docs/src/loaders.txt index 8fd6fe8..20c69e2 100644 --- a/docs/src/loaders.txt +++ b/docs/src/loaders.txt @@ -82,9 +82,10 @@ Note that you have to give it a higher priority in the MRO than the fn = join(self.path, name) if exists(fn): return getmtime(fn) - return 0 + return -1 You don't have to provide the `check_source_changed` method. If it doesn't exist the option `auto_reload` won't have an effect. Also note that the `check_source_changed` method must not raise an exception if the template -does not exist but return ``0``. +does not exist but return ``-1``. The return value ``-1`` is considered +"always reload" whereas ``0`` means "do not reload". \ No newline at end of file diff --git a/www/faq.tmpl b/www/faq.tmpl index 630aeef..ac4ebea 100644 --- a/www/faq.tmpl +++ b/www/faq.tmpl @@ -42,4 +42,44 @@ python constructs have a look at mako. If you want sandboxed templates you probably want to check out Jinja.

+

Differences to Django

+

+ While the Jinja default syntax looks pretty much like Django the rest of + the template engine works completely different. Jinja was designed to be + used without Django and to support Python expressions. +

+

Features that Jinja has in common with Django

+ +

Differences to Django

+ <% endblock %>