Mercurial > libervia-web
changeset 1323:a20fe9eb307b
pages (blog/view/atom.xml): fixed items management after blog_view changes
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 02 Aug 2020 20:57:55 +0200 |
parents | a0954b6610aa |
children | 898442c4ff68 |
files | libervia/pages/blog/view/atom.xml/page_meta.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/pages/blog/view/atom.xml/page_meta.py Sun Aug 02 17:45:15 2020 +0200 +++ b/libervia/pages/blog/view/atom.xml/page_meta.py Sun Aug 02 20:57:55 2020 +0200 @@ -11,8 +11,7 @@ template = "blog/atom.xml" -@defer.inlineCallbacks -def prepare_render(self, request): +async def prepare_render(self, request): request.setHeader("Content-Type", "application/atom+xml; charset=utf-8") data = self.getRData(request) service, node = data["service"], data.get("node") @@ -22,8 +21,8 @@ data["show_comments"] = False template_data = request.template_data blog_page = self.getPageByName("blog_view") - yield blog_page.prepare_render(self, request) - items = data["items"] + await blog_page.prepare_render(self, request) + items = data["blog_items"]['items'] template_data["request_uri"] = self.host.getExtBaseURL( request, request.path.decode("utf-8") @@ -36,6 +35,6 @@ request, blog_view.getURL(service.full(), node) ) if items: - template_data["updated"] = items[0].updated + template_data["updated"] = items[0]['updated'] else: template_data["updated"] = time.time()