Normally, "importing" a namespace in Mako appears to only allow access to defs.
## base.mako
<%
somevar = ["one", "two", "three"]
%>
<%def name="foo()">Bar</%def>
And an importing template:
## child.mako
<%namespace name="base" file="base.mako" />
${base.foo()} # works
${base.somevar} # fails: no soup for you
In my use case somevar
and foo
are related. It would be convenient for me to also be able to access somevar
from within the importing template. What is the best practice for doing this?