Hermes Agent d98ef560c0 feat: add Excel export for leads and content
- export_leads.dspy: generate xlsx with openpyxl, base64 return
- export_content.dspy: generate xlsx for content list
- admin.ui: add export section with download buttons
- load_path.py: register export endpoints for RBAC
- pyproject.toml: add openpyxl dependency
2026-06-15 16:24:02 +08:00

CMS 内容管理模块

企业官网内容管理与钉钉审批工作流模块基于Sage/bricks-framework开发。

功能

  • 内容管理: 新闻/案例/产品/Banner的统一CRUD带发布审批状态流
  • 分类管理: 按content_type分组的层级分类
  • 栏目管理: 官网页面栏目配置
  • 商机线索: 网站访客提交 + AI抽取
  • 站点配置: Hero标语、页脚等KV配置
  • 钉钉审批: 内容发布审批工作流

数据库表

表名 用途
cms_content 统一内容表
cms_categories 内容分类
cms_sections 栏目管理
cms_leads 商机线索
cms_site_config 站点配置
dd_approvals 审批记录
dd_approval_configs 审批流程配置

安装

pip install -e ~/repos/cms

集成

在Web应用(app/portal.py)中:

from cms.init import load_cms

def init():
    load_cms()

初始数据

init/data.yaml 包含:

  • appcodes/appcodes_kv: 枚举编码(content_type, content_status, lead_status等)
  • cms_categories: 默认分类
  • cms_site_config: 默认站点配置
  • cms_sections: 默认栏目配置
  • dd_approval_configs: 默认审批配置

环境变量 (钉钉审批)

DINGTALK_APP_KEY=xxx
DINGTALK_APP_SECRET=xxx
DINGTALK_AGENT_ID=xxx

缺少环境变量时自动使用mock响应。

Description
No description provided
Readme 245 KiB
Languages
Python 99.9%
Shell 0.1%