# HG changeset patch # User Goffi # Date 1633083187 -7200 # Node ID b46fec21ceb98d06666821ebd7fea18c6cdd0cee # Parent e85ef5f3515eb3fc28d06d0cdcc7241bcb462166 pages (lists/edit): redirect to item instead of list and don't show confirm message diff -r e85ef5f3515e -r b46fec21ceb9 libervia/pages/lists/edit/page_meta.py --- a/libervia/pages/lists/edit/page_meta.py Fri Oct 01 12:12:30 2021 +0200 +++ b/libervia/pages/lists/edit/page_meta.py Fri Oct 01 12:13:07 2021 +0200 @@ -78,8 +78,7 @@ template_data["new_list_item_xmlui"] = list_item -@defer.inlineCallbacks -def on_data_post(self, request): +async def on_data_post(self, request): data = self.getRData(request) service = data["service"] node = data["node"] @@ -94,20 +93,21 @@ profile = self.getProfile(request) # we convert back body to XHTML - body = yield self.host.bridgeCall( + body = await self.host.bridgeCall( "syntaxConvert", posted_data['body'][0], "markdown", C.SYNTAX_XHTML, False, profile) posted_data['body'] = ['
{body}
'.format(ns=C.NS_XHTML, body=body)] extra = {'update': True} - yield self.host.bridgeCall( + await self.host.bridgeCall( "listSet", service.full(), node, posted_data, "", item_id, data_format.serialise(extra), profile ) - # we don't want to redirect to edit page on success, but to list overview data["post_redirect_page"] = ( - self.getPageByName("lists"), + self.getPageByName("list_view"), service.full(), node or "@", + item_id ) + return C.POST_NO_CONFIRM