From: Armin Ronacher Date: Mon, 12 May 2008 23:05:20 +0000 (+0200) Subject: documented set changes X-Git-Tag: 2.0rc1~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2e30cf582bf65c2d9e6554236f1e7851e4b08600;p=jinja2.git documented set changes --HG-- branch : trunk --- diff --git a/docs/templates.rst b/docs/templates.rst index 62ca9e3..4270b9d 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -625,10 +625,10 @@ Inside code blocks you can also assign values to variables. Assignments at top level (outside of blocks, macros or loops) are exported from the template like top level macros and can be imported by other templates. -Assignments are just written in code blocks like any other statement just -without explicit keyword:: +Assignments use the `set` tag and can have multiple targets:: - {% navigation = [('index.html', 'Index'), ('about.html', 'About')] %} + {% set navigation = [('index.html', 'Index'), ('about.html', 'About')] %} + {% set key, value = call_something() %} Extends