Ask Your Question

macro hides all other variables?

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

pcompassion gravatar image

does macro hide all other variables passed from views?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

Evgeny gravatar image

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


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

Seen: 99 times

Last updated: Aug 01 '13