Changeset - da121e5eb4d4
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 1 month ago 2024-03-21 23:10:57
ben@sturm.com.au
Specify encoding for templates in case it's not the default
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy/views.py
Show inline comments
...
 
@@ -48,7 +48,7 @@ def index(request, *args, **kwargs):
 
            pass
 
        # These template are intentionally not in the template loader path, so
 
        # 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())
 
        context = RequestContext(request, kwargs)
 
        return HttpResponse(template.render(context))
0 comments (0 inline, 0 general)