From: Armin Ronacher Date: Tue, 22 May 2007 09:42:31 +0000 (+0200) Subject: [svn] renderincluded is now rendertemplate X-Git-Tag: 2.0rc1~317 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d844a1c2e11d10980fd643efa1da618a0825977;p=jinja2.git [svn] renderincluded is now rendertemplate --HG-- branch : trunk --- diff --git a/docs/src/designerdoc.txt b/docs/src/designerdoc.txt index 8eeaef4..eb872ce 100644 --- a/docs/src/designerdoc.txt +++ b/docs/src/designerdoc.txt @@ -366,7 +366,13 @@ load macros, `include` works better than `extends`: If you define a macro called ``my_helper`` in ``myhelpers.html``, you can now use it from the template as shown above. -Because of the +Please keep in mind that include does not render the template indenpendently +but includes the processing instructions into the current template. Thus if the +included template contains a ``{% extends %}`` tag it also affects the current +template. + +This is intended because it makes it possible to include macros from other +templates. Filtering Blocks ================ diff --git a/jinja/defaults.py b/jinja/defaults.py index 18bcc8f..0a00015 100644 --- a/jinja/defaults.py +++ b/jinja/defaults.py @@ -22,5 +22,5 @@ DEFAULT_NAMESPACE = { 'debug': debug_helper, 'lipsum': generate_lorem_ipsum, 'watchchanges': watch_changes, - 'renderincluded': render_included + 'rendertemplate': render_included }