Unicode support was added to UiRequest.py

This commit is contained in:
Pyotr Ermishkin 2015-01-25 15:28:45 +03:00
parent 024655cf15
commit 9332c9dcac
1 changed files with 3 additions and 2 deletions

View File

@ -84,8 +84,9 @@ class UiRequest:
def render(self, template_path, *args, **kwargs):
#template = SimpleTemplate(open(template_path), lookup=[os.path.dirname(template_path)])
#yield str(template.render(*args, **kwargs).encode("utf8"))
template = open(template_path).read()
yield template.format(**kwargs)
ENCODING = 'utf-8'
template = unicode(open(template_path).read(), ENCODING)
yield template.format(**kwargs).encode(ENCODING)
# - Actions -