Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
283 lines (189 sloc) 11.9 KB

API References


Python APIs for creating CMS contents. This is done in :mod:`cms.api` and not on the models and managers, because the direct API via models and managers is slightly counterintuitive for developers. Also the functions defined in this module do sanity checks on arguments.


None of the functions in this module does any security or permission checks. They verify their input values to be sane wherever possible, however permission checks should be implemented manually before calling any of these functions.

Functions and constants

Example workflows

Create a page called 'My Page using the template 'my_template.html' and add a text plugin with the content 'hello world'. This is done in English:

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')


Inherits django.contrib.admin.options.ModelAdmin.


A navigation node in a menu tree.

param string title:The title to display this menu item with.
param string url:The URL associated with this menu item.
param id:Unique (for the current tree) ID of this item.
param parent_id:Optional, ID of the parent item.
param parent_namespace:Optional, namespace of the parent.
param dict attr:Optional, dictionary of additional information to store on this node.
param bool visible:Optional, defaults to True, whether this item is visible or not.
Jump to Line
Something went wrong with that request. Please try again.