fix: add get_module_dbname to plugin for portal unified DB
This commit is contained in:
parent
ab3e3b3f64
commit
b1319a9f1e
@ -81,11 +81,17 @@ async def get_latest_news(limit=3):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def get_module_dbname(module_name):
|
||||||
|
"""Portal 所有模块共用 ocai_cms 数据库"""
|
||||||
|
return 'ocai_cms'
|
||||||
|
|
||||||
|
|
||||||
def load_cms():
|
def load_cms():
|
||||||
g = ServerEnv()
|
g = ServerEnv()
|
||||||
g.get_site_config = get_site_config
|
g.get_site_config = get_site_config
|
||||||
g.get_published_content = get_published_content
|
g.get_published_content = get_published_content
|
||||||
g.get_latest_news = get_latest_news
|
g.get_latest_news = get_latest_news
|
||||||
|
g.get_module_dbname = get_module_dbname
|
||||||
|
|
||||||
|
|
||||||
load_cms()
|
load_cms()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user