Mercurial > libervia-website
diff pages/news/page_meta.py @ 8:dc880664a8ec
modernisation of the theme using Bulma
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Apr 2021 18:51:12 +0200 |
parents | 9ce41ef66dfa |
children | 5fd933e238bb |
line wrap: on
line diff
--- a/pages/news/page_meta.py Tue May 26 12:38:56 2020 +0200 +++ b/pages/news/page_meta.py Fri Apr 16 18:51:12 2021 +0200 @@ -1,9 +1,5 @@ -#!/usr/bin/env python2.7 -# -*- coding: utf-8 -*- - from libervia.server.constants import Const as C from twisted.words.protocols.jabber import jid -from twisted.internet import defer from sat.core.i18n import _ from sat.core.log import getLogger @@ -15,8 +11,7 @@ node = None -@defer.inlineCallbacks -def prepare_render(self, request): +async def prepare_render(self, request): global service, node if service is None: blog_dict = self.getConfig('news_blog_dict', {}) @@ -43,4 +38,4 @@ # we now need blog items, using blog common page # this will fill the "items" template data blog_page = self.getPageByName("blog_view") - yield blog_page.prepare_render(self, request) + await blog_page.prepare_render(self, request)