workgroup
Workgroup leader: Andrew
Workgroup members: Narender, Jacob, Mike, Francesco, Paul, Florian, Vinit, Dimitri, Simon, Vel, Gabriel, Mark, Ashis, Andrew, Fabian
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
develop-4
branch (fabian)To be ideally completed by the next meeting
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Open PR (see project board)
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Attendees:
Agenda
Demo new module cms.admin.utils
allowing to make some v4 improvements better usable by third-party apps (Blog, Alias, etc…):
cms.admin.utils
: Regular items: View button (takes you to the view endpoint), Settings button (takes you to the change admin)GrouperModelAdmin
to allow for simple admin of grouper-content models, esp. with extra grouping fields:
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Agenda
Attendees:
Action Points
Feedback release candidate
Update on Priorities
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Priorities
Attendees:
Agenda
Action Points
To be ideally completed by the next meeting
Attendees:
Agenda
Action Points
To be ideally completed by the next meeting
Attendees:
Agenda
Action Points
To be ideally completed by the next meeting
Attendees:
Agenda
Action Points
To be ideally completed by the next meeting
support/4.0.x
branch for djangocms-versioningmaster
after branching off 4.0.x
Attendees:
Agenda
Action Points
To be ideally completed by the next meeting
cms.pluginmodel.Plugin.copy_plugin
method.Attendees:
Action Points
To be ideally completed by the next meeting
Attendees:
Action Points
To be ideally completed by the next meeting
Attendees:
Items discussed
Attendees:
Updates
Items discussed
Attendees:
Items discussed
django CMS 4.0 is the next major release and a milestone for the django CMS project. Version 4.0 includes versioning, better ways of managing static content (example: footer or menu), better ways of managing URLs and linking to django CMS URLs and more. The release is already quite progressed, but help is always needed.
Disclaimer: scope and estimates are tentative and can change along the way
The documentation has been moved out of this document and is slowly being added to the codebase of the project. Here is a temporary link that will be updated as and when documentation is merged. :-)
https://github.com/django-cms/django-cms/pull/7367
Topic | Description |
---|---|
New Plugin Architecture (Backend) | Treebeard was previously used. Treebeard only used for pagetree. Migration possible, simple |
Placeholder field relations | Affected for programmed placeholder fields. Now better to know what plugin is stored where. Should still work on a migration, source is backwards compatible |
Pages and titles | Placeholders are now separated into languagesBefore you had one placeholder per page for all languages now it is 3placeholders for 3 languages |
Title is now “page contents” | Basic settings were stored in the title object and advanced settings in the page object. Title is now PageContentSome settings have been moved to PageContent. For example templates can now be set as PageContent meaning if you have different languages each language can have a different template. Should be fine but might eventually require work |
Changes in how we store the URL information | Slug and path is now stored outside of PageContentIs now stored in PageUrlShould be migrated to new system |
Publishing of django CMS has been removed | Draft and live pages don’t exist anymore. Migration is possible and has been achieved. |
?edit has been removed | There are 3 new endpoints to change contentLive version of the page. Edit button that goes to versioning. Preview view of a websiteKeep ?edit would the same as ?toolbar_on. Should be migrated to new system |
New system to interact between addons via CMSAppConfig andCMSAppExtension | Is a new systemBackwards compatibility is available |
Disabled Features – Backwards Incompatible | Page types have been disabled. Why has it been removed, alternative? GOOD Default plugins per placeholder on render (if the placeholder isempty check if it has configured default plugins > create these on rendertime). Handover 3Kryz working on an add-on to do it on addon level. Temporary removal, Ask Andrew Aikman about registering the PageType model with the Placeholder endpoints: https://github.com/django-cms/django-cms/pull/6503 |
Need to continue conversation | A few things have been removed from the core. Removing / deprecating the alias addon. Upgrade path can be added. Default plugins. Feature from placeholder configurations. Plugin inheritance has been removed. If placeholder is empty take the plugins from the parentKeep or remove? Static placeholders will be gone? As plugins cannot be stored the traditional way. Add warning for deprecations that changes will be removed in 4.2 |
WIP with examples from the following PR's to follow:
TODO:
The PlaceholderField
has been replaced by the PlaceholderRelationField
TODO:
(Reported by Fabian when testing djangocms-frontend)
To test your app against django CMS version 4 you likely will need to adjust your tests.
Frist, we for the time being recommend to following requirements for django CMS v4 (development version) for the Django and django CMS part:
Django>=3.2,<4.0
-e git+https://github.com/django-cms/django-cms.git@develop-4#egg=django-cms
-e git+https://github.com/Aiky30/djangocms-alias.git@feature/django-32-compat#egg=djangocms-alias
-e git+https://github.com/django-cms/djangocms-url-manager.git@master#egg=djangocms-url-manager
https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning
-e git+https://github.com/FidelityInternational/djangocms-pageadmin.git@1.0.0#egg=djangocms-pageadmin
-e git+https://github.com/FidelityInternational/djangocms-version-locking.git@master#egg=djangocms-version-locking
You might have to adjust your fixtures to differentiate test for django CMS v3 and django CMS v4.
To determine if tests are run against v3 or v4, add this to your test settings (this assumes the above requiremets):
try:
import djangocms_versioning # V4 test?
INSTALLED_APPS += [
"djangocms_versioning",
"djangocms_alias",
"djangocms_url_manager",
]
except ImportError: # Nope
pass
Then you can differentiate within your testing environment (or in your app for that matter) by checking for a v4 app, say djangocms_versioning
:
from django.apps import apps
DJANGO_CMS4 = apps.is_installed("djangocms_versioning")
Key differences to test against v3 and v4 are:
page.palceholders
is not present in django CMS v4. Use page.get_placeholders(language)
instead. Note, however, that in v4 page.get_placeholders(language)
requires the language parameter while in v3 it must not be present. A solution can be to add a method get_placeholders
to your test class that calls the page's method with or without the language parameter depending on which version you are testing with.
page.publish
, page.unpublish
: In django CMS v4 the Page
model does not have .publish
or .unpublish
methods. Publication is handleded by djangocms-versioning. This requires to find all versions of a page and identifying the current draft version to publish or the current published version to unpublish. For an example code fragment see below.
create_page
: The CMS function crate_page
needs additional arguments in v4:
created_by
: User who creates the page. Can often be self.superuser
in_navigation
: Can default to True
limit_visibility_in_menu
: Can default to None
To test djangocms-frontend I added the following code fragment to by test fixture mixin:
if DJANGO_CMS4: # CMS V4
def _get_version(self, grouper, version_state, language=None):
language = language or self.language
from djangocms_versioning.models import Version
versions = Version.objects.filter_by_grouper(grouper).filter(
state=version_state
)
for version in versions:
if (
hasattr(version.content, "language")
and version.content.language == language
):
return version
def publish(self, grouper, language=None):
from djangocms_versioning.constants import DRAFT
version = self._get_version(grouper, DRAFT, language)
if version is not None:
version.publish(self.superuser)
def unpublish(self, grouper, language=None):
from djangocms_versioning.constants import PUBLISHED
version = self._get_version(grouper, PUBLISHED, language)
if version is not None:
version.unpublish(self.superuser)
def create_page(self, title, **kwargs):
kwargs.setdefault("language", self.language)
kwargs.setdefault("created_by", self.superuser)
kwargs.setdefault("in_navigation", True)
kwargs.setdefault("limit_visibility_in_menu", None)
kwargs.setdefault("menu_title", title)
return create_page(
title=title,
**kwargs
)
def get_placeholders(self, page):
return page.get_placeholders(self.language)
else: # CMS V3
def publish(self, page, language=None):
page.publish(language)
def unpublish(self, page, language=None):
page.unpublish(language)
def create_page(self, title, **kwargs):
kwargs.setdefault("language", self.language)
kwargs.setdefault("menu_title", title)
return create_page(
title=title,
**kwargs
)
def get_placeholders(self, page):
return page.get_placeholders()
Package & date | Issue |
---|---|
django-cms 18/03/22 | The page tree needs a button to manage page versions if djangocms-versioning is installed. |
djangocms-versioning 13/04/22 | There is not "view on site" or "view published" link from a published version |
Date: 28/03/2022
Package V3 | V4 replacement | Testing against v4 | Importance | Target |
---|---|---|---|---|
django-cms | django-cms | Add depr. warnings? | 5 | ? |
djangocms-link (depr.) | djangocms-url-manager | Yes | 5 | ? |
djangocms-link (depr.) | djangocms-frontend | Yes, common code | 4 | Q1/22 |
djangocms-moderation | Yes | 5 | ? | |
djangocms-versioning | Yes | 5 | ? | |
djangocms-alias | djangocms-alias | Yes, common code | 5 | ? |
djangocms-file | djangocms-file | ? | 5 | ? |
django-filer | django-filer | ? | 5 | ? |
djangocms-admin-style | djangocms-admin-style | to do, common code | 3 | ? |
djangocms-text-ckeditor | djangocms-text-ckeditor | ? | 5 | ? |
djangocms-text-ckeditor | djangocms-text-ckeditor5 | ? | 3 | ? |
djangocms-column (depr.) | depr. | - | - | |
djangocms-attributes-field | djangocms-attributes-field | Yes, common code | 5 | ? |
djangocms-snippet | djangocms-snippet | to do | 3 | ? |
djangocms-icon | djangocms-icon | to do | 4 | ? |
djangocms-audio | djangocms-audio | to do | 3 | ? |
djangocms-style | djangocms-style | to do | 3 | ? |
djangocms-history (depr.) | depr. | - | - | |
djangocms-googlemap (depr.) | djangocms-maps (?) | ? | 3 | ? |
djangocms-maps (?) | djangocms-maps (?) | ? | 3 | ? |
djangocms-modules | djangocms-modules | ? | 3 | ? |
djangocms-transfer | djangocms-transfer | ? | 2 | ? |
djangocms-video | djangocms-video | ? | 3 | ? |
djangocms-video | djangocms-frontend? | Yes, common code | 3 | Q2/22 |
djangocms-picture | djangocms-frontend | Yes, common code | 4 | Q1/22 |
djangocms-bootstrap4 | djangocms-frontend | Yes, common code | 4 | Q1/22 |
djangocms-bootstrap5 | djangocms-frontend | Yes, common code | 4 | Q1/22 |
djangocms-frontend | djangocms-frontend | Yes, common code | 4 | Q1/22 |
cmsplugin-filer | depr. | - | - | |
djangocms-blog | djangocms-blog | Not yet | 5 | - |
… | … | - | - |