Specify encoding for templates in case it's not the default
This commit is contained in:
parent
fe64a26a72
commit
da121e5eb4
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ def index(request, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
# These template are intentionally not in the template loader path, so
|
# These template are intentionally not in the template loader path, so
|
||||||
# we open them directly, rather than using the template loader.
|
# we open them directly, rather than using the template loader.
|
||||||
with open(full_path) as t:
|
with open(full_path, encoding='utf-8') as t:
|
||||||
template = Template(t.read())
|
template = Template(t.read())
|
||||||
context = RequestContext(request, kwargs)
|
context = RequestContext(request, kwargs)
|
||||||
return HttpResponse(template.render(context))
|
return HttpResponse(template.render(context))
|
||||||
|
|
Loading…
Reference in a new issue