Merge pull request #33 from quasiyoke/master

Unicode support was added to UiRequest.py
This commit is contained in:
ZeroNet 2015-01-25 22:55:18 +01:00
commit 1468756691

View file

@ -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 -