Skip to content
Myr

Merge pull request #94 from florentx/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix the Mako-like environment.

authored by Armin Ronacher · committed by Armin Ronacher · parents 3054985, 21b624b · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/switching.rst+2 added-2 removed
211 unmodified lines
212Jinja2 to look more like Mako:213214.. sourcecode:: python215216 env = Environment('<%', '%>', '${', '}', '%')216 env = Environment('<%', '%>', '${', '}', '<%doc>', '</%doc>', '%', '##')217218Once the environment is configure like that Jinja2 should be able to interpret218Once the environment is configured like that Jinja2 should be able to interpret219a small subset of Mako templates. Jinja2 does not support embedded Python code220so you would have to move that out of the template. The syntax for defs (in221Jinja2 defs are called macros) and template inheritance is different too. The222following Mako template::
20 unmodified lines