diff --git a/src/dreamii/app.py b/src/dreamii/app.py index cc5d5af..cc306b0 100644 --- a/src/dreamii/app.py +++ b/src/dreamii/app.py @@ -61,7 +61,7 @@ class TemplateView(BaseView): renderer = MarkdownRenderer(self.request.app, path) response = web.Response(text=renderer.render()) else: - reponse = await super().render_template(path, self.request, context) + response = await super().render_template(path, self.request, context) response.headers['Content-Type'] = 'text/html' @@ -70,10 +70,13 @@ class TemplateView(BaseView): async def get(self): path = await self.resolve_template(self.request.match_info['tail']) if path: + print("Found path", path) return await self.render_template(path) path = pathlib.Path(self.request.app.template_path).joinpath(self.request.match_info['tail'].lstrip('/')) if path.exists(): + print("Found non template path", path) return web.Response(body=path.read_bytes()) + print("Path not found", path) return web.Response(status=404) async def post(self):