📜  django cms api 创建页面 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:07.825000             🧑  作者: Mango

代码示例1
from cms.api import create_page, add_plugin

page = create_page('My Page', 'my_template.html', 'en')
placeholder = page.placeholders.get(slot='body')
add_plugin(placeholder, 'TextPlugin', 'en', body='hello world')