Now I want to be able to use these namespaces in different files, as:
<%include file="namespaces.mako" />
${a.foo()}
But this doesn't work. What's the correct way to do this?
Thanks.
binadam
unread,
Feb 14, 2013, 4:53:49 PM2/14/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mako-d...@googlegroups.com
Guess I should mention the error:
AttributeError: 'Undefined' object has no attribute 'foo'
Michael Bayer
unread,
Feb 15, 2013, 11:01:50 AM2/15/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mako-d...@googlegroups.com
that would be something like a "static include" but that's not something Mako has.
There's really not a built in function for this, the best you could do would be something like building a custom preprocessor that adds in <%namespace> tags, if you wanted to do that you could use the "preprocessor" argument to Template / TemplateLookup.