From 6ec1b7e8e36da9dfcc9be19652f13743ebe8fa04 Mon Sep 17 00:00:00 2001
From: Armin Ronacher
Date: Thu, 22 Mar 2007 10:24:00 +0100
Subject: [PATCH] [svn] update on webpage and docs
--HG--
branch : trunk
---
docs/src/loaders.txt | 5 +++--
www/faq.tmpl | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 2 deletions(-)
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
+
+ - filter functions
+ - block based template inheritance
+ - the {% cycle %} and {% filter %}
tag
+ - being sandboxed
+ - similar default syntax
+
+ Differences to Django
+
+ - advanced lexer that allows escaping of tags
+ - generation of bytecode for faster template execution
+ - definition of macros (often recurring tasks like rendering
+ dialog boxes, form elements etc.)
+ - raw blocks
+ - uncoupled internationalization support
+ - expression support in any tag
+ - abbility of modifying the context from the template
+ by using the {% set %}
tag.
+ - support for function calling with arguments
+ - filters can be called with a variable argument count
+ - full unicode support
+ - deferred objects (objects that are resolved on first
+ access, not on context instanciation)
+ - Missing support for {{ block.super }}
+ - Support for recursing by using recursing for loops
+ or self calling macros.
+ - If blocks have support for multiple elif statements
+ - for loops have an optional else block executed if
+ there was no iteration.
+ - test functions like is even etc.
+ - block delimiters are exchangeable.
+
- no implicit function calling
+
<% endblock %>
--
2.26.2