diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2013-10-08 16:28:15 -0700 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2013-10-08 16:28:15 -0700 |
commit | 99d3272ba4d84d2b6dcc0bd46a48553f83787755 (patch) | |
tree | fc4bdc9629f6cf2f75fb78d3bdeb75e8a18b4792 /mako | |
parent | 70f561b14672d87855d7b2255804225b664093c3 (diff) | |
parent | 8cccf4a8a83f90720d6f75ebc1a1b31f4cef3182 (diff) | |
download | mako-99d3272ba4d84d2b6dcc0bd46a48553f83787755.tar.gz |
Merge pull request #5 from vmagamedov/master
Fixed TGPlugin.render method to support unicode template names in py2k.
Diffstat (limited to 'mako')
-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..a1e3ab8 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, compat.string_types): template = self.load_template(template) # Load extra vars func if provided |