Why does django-cms need such feature ?
django-cms needs a public api to create pages (with plugin) because right now it is very hard to create a page using python api. This involves using the test client to simulate user interaction in the admin, thread local, and all kind of hack.
When do we need to use this feature :
• test
• Migration from existing cms
• backup / restore
Potential Benefits
---------------------------
Faster test suite because we will not use any more the test client to emulate user interactions on the admin interface.
Foundation for writing "on the shelf importers" (Wordpress, Drupal, site scraping ...) or to let developers to write their own tools.
API
-------
create_page method could be added to the manager "Page.objets.createpage(...)". This method takes all the attributes available in Page admin interface (except the permission) and dispatch them to the underlying Models (Title, Page, ....) and it return the created page.
add_plugin(language, placholder, plugin, position) method could be added directly on the Page model "page.add_plugin(...)". The placeholder can be either a "string" or a placeholder instance and the plugin is an instance of a CMSPlugin.
I am looking forward to hearing from you on this proposal.
Regards,
--yml