- 将 entcms/wwwroot/* 移到 wwwroot/ - 将 dingdingflow/wwwroot/* 移到 wwwroot/dingdingflow/ - 更新 config.json 使用单一 wwwroot 映射 - 更新 init_any_permissions.py 扫描新路径 - 更新 init_superuser_permissions.py 用法说明 - 废弃 entcms/scripts/load_path.py 和 dingdingflow/scripts/load_path.py - 更新 build.sh 构建步骤 - 更新 README.md 和 docs/architecture.md 目录说明
18 lines
559 B
Plaintext
18 lines
559 B
Plaintext
import json
|
|
from appPublic.uniqueID import getID
|
|
|
|
config = getConfig('.')
|
|
DBPools(config.databases)
|
|
dbname = get_module_dbname('entcms')
|
|
sor = DBPools().sqlorContext(dbname)
|
|
|
|
content_type = params_kw.get('content_type', None)
|
|
limit = int(params_kw.get('limit', '10'))
|
|
ns = {'status': 'published', 'sort': 'sort_order asc, published_at desc'}
|
|
if content_type:
|
|
ns['content_type'] = content_type
|
|
rows = await sor.R('cms_content', ns)
|
|
if limit:
|
|
rows = rows[:limit]
|
|
print(json.dumps({'status': 'ok', 'rows': rows, 'total': len(rows)}, ensure_ascii=False))
|