Ask Your Question
0

macro hides all other variables?

asked 2013-08-01 06:39:17 -0500

pcompassion's avatar

does macro hide all other variables passed from views?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-01 16:52:04 -0500

Evgeny's avatar

Yes, Jinja2 macros have only access to variables passed explicitly, or via other special channels that Jinja2 templating uses.

This may be circumvented by creating custom template filter functions as inside functions it is possible to do more.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-01 06:39:17 -0500

Seen: 140 times

Last updated: Aug 01 '13

Related questions