Update controllers.py

fix a bug with reading template file
This commit is contained in:
d9394 2019-10-06 16:05:30 +08:00 committed by GitHub
parent 2e394dc2cb
commit db663fe134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ class AprsSymbolsController(AssetsController):
class TemplateController(Controller): class TemplateController(Controller):
def render_template(self, file, **vars): def render_template(self, file, **vars):
f = open("htdocs/" + file, "r") f = open("htdocs/" + file, "r", encoding="utf-8")
template = Template(f.read()) template = Template(f.read())
f.close() f.close()