Closed bittner closed 7 years ago
Good news! I made it work to create blog entries programmatically. The solution is a bit hacky though, could do with some code review. :smirk: Please, see the following code pieces:
Some inspiration came from the test cases for Zinnia's managers, the rest from the django CMS API documentation.
Would be nice if we could have a public API in this cmsplugin too, so we could hide the ugly internals of filling the placeholder, etc. -- django CMS' create_page() could be a :scream: role model. :relieved:
Is there a recommended way of creating content, especially with django CMS placeholders? There doesn't seem to be an API, at least not exposed, promoted or documented.
I need to create content (with a Django management command) on an empty Zinnia blog + django CMS 3.2 combo. django CMS has the create_page, add_plugin, etc. functions as part of their API. Something similar would be nice in Zinnia.