Merge pull request #33 from quasiyoke/master
Unicode support was added to UiRequest.py
This commit is contained in:
commit
1468756691
1 changed files with 3 additions and 2 deletions
|
@ -84,8 +84,9 @@ class UiRequest:
|
||||||
def render(self, template_path, *args, **kwargs):
|
def render(self, template_path, *args, **kwargs):
|
||||||
#template = SimpleTemplate(open(template_path), lookup=[os.path.dirname(template_path)])
|
#template = SimpleTemplate(open(template_path), lookup=[os.path.dirname(template_path)])
|
||||||
#yield str(template.render(*args, **kwargs).encode("utf8"))
|
#yield str(template.render(*args, **kwargs).encode("utf8"))
|
||||||
template = open(template_path).read()
|
ENCODING = 'utf-8'
|
||||||
yield template.format(**kwargs)
|
template = unicode(open(template_path).read(), ENCODING)
|
||||||
|
yield template.format(**kwargs).encode(ENCODING)
|
||||||
|
|
||||||
|
|
||||||
# - Actions -
|
# - Actions -
|
||||||
|
|
Loading…
Reference in a new issue