You can invoke the django CMS command line interface using the cms Django command:
python manage.py cms
The list command is used to display information about your installation.
It has two subcommands:
cms list plugins will issue warnings when it finds orphaned plugins (see cms delete_orphaned_plugins below).
Checks your configuration and environment.
Warning
The delete_orphaned_plugins command permanently deletes data from your database. You should make a backup of your database before using it!
Identifies and deletes orphaned plugins.
Orphaned plugins are ones that exist in the CMSPlugins table, but:
Such plugins will cause problems when trying to use operations that need to copy pages (and thefore plugins), which includes cms moderator on as well as page copy operations in the admin.
It is advised to run cms list plugins periodically, and cms delete_orphaned_plugins when required.
The uninstall subcommand can be used to make uninstalling a CMS Plugin or an apphook easier.
It has two subcommands:
Warning
The uninstall commands permanently delete data from your database. You should make a backup of your database before using them!
The copy-lang subcommand can be used to copy content (titles and plugins) from one language to another. By default the subcommand copy content from the current site (e.g. the value of SITE_ID) and only if the target placeholder has no content for the specified language; using the defined options you can change this.
You must provide two arguments:
It accepts the following options
Example:
cms copy-lang en de force-copy site=2 verbose
If you migrate from an earlier version, you should use the cms moderator on command to ensure that your published pages are up to date, whether or not you used moderation in the past.
Warning
This command alters data in your database. You should make a backup of your database before using it! Never run this command without first checking for orphaned plugins, using the cms list plugins command, and if necessary delete_orphaned_plugins. Running cms moderator with orphaned plugins will fail and leave bad data in your database.
If you want to publish many pages at once, this command can help you. By default, this command publishes drafts for all public pages.
It accepts the following options
Example:
#publish drafts for public pages in all languages
publisher_publish
#publish all drafts in all pages
publisher_publish --unpublished
#publish drafts for public pages in deutsch
publisher_publish --language=de
#publish all drafts in deutsch
publisher_publish --unpublished --language=de
#publish all drafts in deutsch, but only for site with id=2
publisher_publish --unpublished --language=de --site=2
Warning
This command publishes drafts. You should review drafts before using this command, because they will become public.