문제

How can I make a namespace of the form:

<%namespace name="foo" module="foo.bar" />

available to all of the templates in my project by default; so rather than each template having to include the above line at the start it is just done automatically by mako. I have looked at the Template and TemplateLookup class documentation but there does not seem to be an easy way of doing this.

도움이 되었습니까?

해결책

You can combine inheritance with Inheritable Namespaces to achieve what you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top