From: Armin Ronacher Date: Thu, 15 May 2008 12:48:31 +0000 (+0200) Subject: removed the notice about names in imported macros. that's documented as part of the... X-Git-Tag: 2.0rc1~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02e090509e3662da0b005075abe73bf5c511801b;p=jinja2.git removed the notice about names in imported macros. that's documented as part of the import statement. --HG-- branch : trunk --- diff --git a/docs/templates.rst b/docs/templates.rst index 4270b9d..3adf98a 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -509,13 +509,6 @@ Macros are comparable with functions in regular programming languages. They are useful to put often used idioms into reusable functions to not repeat yourself. -Macros can be defined in helper templates which then are :ref:`imported -` or directly in the template where they are used. There is one big -difference between those two possibilities. A macro that is defined in the -template where it's also used has access to the context passed to the template. -A macro defined in another template and then imported can only access variables -defined there or in the global context. - Here a small example of a macro that renders a form element:: {% macro input(name, value='', type='text', size=20) -%}