Content type.
This commit is contained in:
parent
1447a16bd1
commit
745d076fc8
@ -57,9 +57,11 @@ class TemplateView(BaseView):
|
||||
context['json'] = None
|
||||
if str(path.endswith('.md')):
|
||||
renderer = MarkdownRenderer(self.request.app, path)
|
||||
return web.Response(text=renderer.render(),content_type="text/html")
|
||||
return web.Response(text=renderer.render(), content_type='text/html', charset='utf-8', **context)
|
||||
|
||||
return await super().render_template(path, self.request)
|
||||
reponse = await super().render_template(path, self.request, context)
|
||||
response.headers['Content-Type'] = 'text/html'
|
||||
return response
|
||||
|
||||
async def get(self):
|
||||
path = await self.resolve_template(self.request.match_info['tail'])
|
||||
|
Loading…
Reference in New Issue
Block a user