3.4 release notes¶
The most significant change in this release is the removal of revision support (i.e. undo/redo/recover functionality on pages) from the core django CMS. This functionality will be reinstated as an optional addon in due course, but in the meantime, that functionality is not available.
What’s new in 3.4¶
- Changed the way CMS plugins are rendered. The HTML
cms-pluginclass is no longer rendered around every CMS plugin. Instead a combination of
- Changed asset cache-busting implementation, which is now handled by a path change,
rather than the
- Added the option to copy pages in the page tree using the drag and drop interface.
- Made it possible to use multi-table inheritance for Page/Title extensions.
- Refactored plugin rendering functionality to speed up loading time in both structure and content modes.
- Added a new
Spaceshortcut to switch between structure and content mode while highlighting the current plugin, revealing its position.
- Improved keyboard navigation
- Added help modal about available short-cuts
- Added fuzzy matching to the plugin picker.
- Changed the
downcast_pluginsutility to return a generator instead of a list.
- Fixed a bug that caused an aliased placeholder to show in structure mode.
- Fixed a bug that prevented aliased content from showing correctly without publishing the page first.
- Added help text to an
Aliasplugin change form when attached to a page to show the content editor where the content is aliased from.
- Removed revision support from django CMS core.
As a result both
CMS_MAX_PAGE_PUBLISH_REVERSIONSsettings are no longer supported, as well as the
get_parent_classesnow are implemented as a
Upgrading to 3.4¶
A database migration is required because the default value of CMSPlugin.position was set to 0 instead of null.
Please make sure that your current database is consistent and in a healthy state, and make a copy of the database before proceeding further.
python manage.py migrate python manage.py cms fix-tree
Backward incompatible changes¶
Apphooks & Toolbars¶
As per our deprecation policy we’ve now removed the backwards compatible shim
If you have not done so already, please rename these to
The permissions system was heavily refactored. As a result, several internal functions and methods have been removed or changed.
The following methods were changed to require a user parameter instead of a request:
These are also deprecated in favour of their counterparts in
To keep consistency with both django CMS permissions and Django permissions,
we’ve modified the vanilla permissions system (
CMS_PERMISSIONS = False)
to require users to have certain Django permissions to perform an action.
Here’s an overview:
|Add Page||Can Add Page & Can Change Page|
|Change Page||Can Change Page|
|Delete Page||Can Change Page & Can Delete Page|
|Move Page||Can Change Page|
|Publish Page||Can Change Page & Can Publish Page|
This change will only affect non-superuser staff members.
If you have a custom
Page extension with a configured toolbar,
please see the updated example.
It uses the new permission internals.
Manual plugin rendering¶
We’ve rewritten the way plugins and placeholders are rendered. As a result, if you’re manually rendering plugins and placeholders you’ll have to adapt your code to match the new rendering mechanism.
To render a plugin programmatically, you will need a context and request object.
Manual plugin rendering is not a public API, and as such it’s subject to change without notice.
from django.template import RequestContext from cms.plugin_rendering import ContentRenderer def render_plugin(request, plugin): renderer = ContentRenderer(request) context = RequestContext(request) # Avoid errors if plugin require a request object # when rendering. context['request'] = request return renderer.render_plugin(plugin, context)
Like a plugin, to render a placeholder programmatically, you will need a context and request object.
Manual placeholder rendering is not a public API, and as such it’s subject to change without notice.
from django.template import RequestContext from cms.plugin_rendering import ContentRenderer def render_placeholder(request, placeholder): renderer = ContentRenderer(request) context = RequestContext(request) # Avoid errors if plugin require a request object # when rendering. context['request'] = request content = renderer.render_placeholder( placeholder, context=context, ) return content