diff libervia/pages/forums/view/page_meta.py @ 1427:eaf36fffcbdb

pages (forums): better breadcrumbs
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 19:05:16 +0200
parents 4cf2b73e63aa
children 106bae41f5c8
line wrap: on
line diff
--- a/libervia/pages/forums/view/page_meta.py	Sat May 01 19:05:16 2021 +0200
+++ b/libervia/pages/forums/view/page_meta.py	Sat May 01 19:05:16 2021 +0200
@@ -2,14 +2,14 @@
 
 
 from libervia.server.constants import Const as C
-from twisted.internet import defer
-from sat.core.i18n import _
+from sat.core.i18n import _, D_
 from sat.core.log import getLogger
 from sat.tools.common import data_format
 
 log = getLogger(__name__)
 
 name = "forum_view"
+label = D_("View")
 access = C.PAGES_ACCESS_PUBLIC
 template = "forum/view.html"
 
@@ -18,14 +18,13 @@
     self.getPathArgs(request, ["service", "node"], 2, service="jid")
 
 
-@defer.inlineCallbacks
-def prepare_render(self, request):
+async def prepare_render(self, request):
     data = self.getRData(request)
     data["show_comments"] = False
     blog_page = self.getPageByName("blog_view")
     request.args[b"before"] = [b""]
     request.args[b"reverse"] = [b"1"]
-    yield blog_page.prepare_render(self, request)
+    await blog_page.prepare_render(self, request)
     request.template_data["login_url"] = self.getPageRedirectURL(request)