diff options
author | Vladimir Magamedov <vladimir@magamedov.com> | 2013-09-17 16:31:05 +0300 |
---|---|---|
committer | Vladimir Magamedov <vladimir@magamedov.com> | 2013-09-17 16:31:05 +0300 |
commit | f163df2dc04da74fd4b80db412b1a3e01f4f450f (patch) | |
tree | d0bb3386da5533d1a8e020d24a6b76c149a1e4c7 /mako/ext/turbogears.py | |
parent | e1086cd37e7075102fe9b895372ecacb98732457 (diff) | |
download | external_python_mako-f163df2dc04da74fd4b80db412b1a3e01f4f450f.tar.gz external_python_mako-f163df2dc04da74fd4b80db412b1a3e01f4f450f.tar.bz2 external_python_mako-f163df2dc04da74fd4b80db412b1a3e01f4f450f.zip |
Fixed TGPlugin.render method to support unicode template names in py2k.
Diffstat (limited to 'mako/ext/turbogears.py')
-rw-r--r-- | mako/ext/turbogears.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mako/ext/turbogears.py b/mako/ext/turbogears.py index db71682..d1a6a90 100644 --- a/mako/ext/turbogears.py +++ b/mako/ext/turbogears.py @@ -4,7 +4,8 @@ # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -import re, inspect +import inspect +from mako import compat from mako.lookup import TemplateLookup from mako.template import Template @@ -46,7 +47,7 @@ class TGPlugin(object): return self.lookup.get_template(templatename) def render(self, info, format="html", fragment=False, template=None): - if isinstance(template, str): + if isinstance(template, str if compat.py3k else basestring): template = self.load_template(template) # Load extra vars func if provided |