diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-04 20:06:10 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-04 20:06:10 +0000 |
commit | 1328cee1572c2d47d8d315590aa0478d56176dd5 (patch) | |
tree | cb9bcff32ce1f7e9077934488218d8dea6699917 /lib/mako/codegen.py | |
parent | 8c75479f0cfc2e5ee9bd5f16aa59c17a442b0137 (diff) | |
download | external_python_mako-1328cee1572c2d47d8d315590aa0478d56176dd5.tar.gz external_python_mako-1328cee1572c2d47d8d315590aa0478d56176dd5.tar.bz2 external_python_mako-1328cee1572c2d47d8d315590aa0478d56176dd5.zip |
- implemented "module" attribute for namespace [ticket:7]
Diffstat (limited to 'lib/mako/codegen.py')
-rw-r--r-- | lib/mako/codegen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mako/codegen.py b/lib/mako/codegen.py index efb67cc..f54df0d 100644 --- a/lib/mako/codegen.py +++ b/lib/mako/codegen.py @@ -204,7 +204,7 @@ class _GenerateRenderMethod(object): callable_name = "make_namespace()" else: callable_name = "None" - self.printer.writeline("ns = runtime.Namespace(%s, context._clean_inheritance_tokens(), templateuri=%s, callables=%s, calling_uri=_template_uri)" % (repr(node.name), node.parsed_attributes.get('file', 'None'), callable_name)) + self.printer.writeline("ns = runtime.Namespace(%s, context._clean_inheritance_tokens(), templateuri=%s, callables=%s, calling_uri=_template_uri, module=%s)" % (repr(node.name), node.parsed_attributes.get('file', 'None'), callable_name, node.parsed_attributes.get('module', 'None'))) if eval(node.attributes.get('inheritable', "False")): self.printer.writeline("context['self'].%s = ns" % (node.name)) self.printer.writeline("context.namespaces[(__name__, %s)] = ns" % repr(node.name)) |