Issues

Issue #141 resolved

Support expression substitution for <%namespace /> file

guest
created an issue

from mako.template import Template from mako.lookup import TemplateLookup from mako.exceptions import TemplateLookupException

l = TemplateLookup()

l.put_string('x', """ X: <%include file="${file}" /> """)

l.put_string('y', """ Y: <%namespace name="ns" file="${file}" />

${ns.body()} """)

l.put_string('z', """ Z: """)

print l.get_template('x').render(file='z')

try: print l.get_template('y').render(file='z') except TemplateLookupException, e: print e