diff --git a/lib/mako/plugin.py b/lib/mako/ext/turbogears.py similarity index 100% rename from lib/mako/plugin.py rename to lib/mako/ext/turbogears.py diff --git a/lib/mako/runtime.py b/lib/mako/runtime.py index 9ada09a71f4f2501cc168bccc7936792a5a8edea..4f1792c20fdf94cfa2ca9283ea4bacf4c91b9e52 100644 --- a/lib/mako/runtime.py +++ b/lib/mako/runtime.py @@ -102,7 +102,9 @@ class Namespace(object): uri = property(lambda s:s.template.uri) def get_namespace(self, uri): - """return a namespace corresponding to the given template filename.""" + """return a namespace corresponding to the given template uri. + + if a relative uri, it is adjusted to that of the template of this namespace""" key = (self, uri) if self.context.namespaces.has_key(key): return context.namespaces[key] diff --git a/setup.py b/setup.py index 0dc1afd5c4d3038496fab57fb7ed2440677eaf94..1f0ef3a15b27d3c6927056a9301e8fca8df833e1 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,6 @@ The latest version is available in a `Subversion repository ], entry_points=""" [python.templating.engines] - mako = mako.plugin:TGPlugin + mako-tg = mako.ext.turbogears:TGPlugin """, )