config = getConfig('.') DBPools(config.databases) dbname = get_module_dbname('entcms') async with db.sqlorContext(dbname) as sor: _id = params_kw.get('id', '') if not _id: return {'widgettype': 'Message', 'options': {'text': '缺少ID', 'messagetype': 'error'}} await sor.D('cms_sections', {'id': _id}) return {'widgettype': 'Message', 'options': {'text': '删除成功', 'messagetype': 'success'}}