Skip to main content

django CMS 4 Migration

Warning: If the migration process fails to complete you will not be able to undo the changes without reloading a database backup. We cannot be held accountable for any data loss sustained when running the commands provided in this project. Please keep a database backup before running any commands provided by this package.

When do I need this package?

This package is designed to migrate a django CMS 3.5+ project to django CMS 4.0.

What does this package do?

  • Keeps any draft and published content, ensuring that any new draft changes are kept as a new draft version in djangocms_versioning.

Limitations

Due to the nature of the changes between django CMS 3.5+ and 4.0 the package will fail to function if an incompatible package is installed.

This may require you to:

  • Fork or copy and modify this package to work with any bespoke requirements your project has (we may accept these changes back for popular packages as a configurable option)
  • Ensure that all installed packages for your project are

Prerequisites

Require knowledge of the changes and new features in 4.0:

  • New cms app configuration
  • Revised Page, Title (Now named PageContent) and Placeholder relationships

Requires knowledge of django CMS Versioning

  • Grouper and content model terms
  • Understanding how versioning selects published content

Install the following packages

The following packages are not yet officially released, they need to be installed directly from the repository. We need your help to make packages v4.0 compatible and to provide documentation for the wider community!

django CMS 4.0

pip install http://github.com/divio/django-cms/tarball/release/4.0.x#egg=django-cms

djangocms-text-ckeditor

pip install https://github.com/divio/djangocms-text-ckeditor/tarball/support/4.0.x#egg=djangocms-text-ckeditor

djangocms-versioning

pip install https://github.com/divio/djangocms-versioning/tarball/master#egg=djangocms-versioning

djangocms-alias

pip install https://github.com/divio/djangocms-alias/tarball/master#egg=djangocms-alias

Installation

Warning: This package can leave your DB in a corrupted state if used incorrectly, be sure to backup any databases prior to running any commands listed here!

First install this package in your project

pip install djangocms-4-migration

Running

Simply run the following command to run the data migration. Note: This command calls the django migrate command, this is because it has to run commands that save information that would have been lost by running the cms migrations directly.

python manage.py cms4_migration

Common solutions for django CMS 4.0 compatibility

Import PageContent in a backwards compatible way (Title).

# django CMS v4
try:
    from cms.models import PageContent
# django CMS 3.x
except ImportError:
    from cms.models import Title as PageContent

Metadata

Release files for djangocms-4-migration 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangocms-4-migration 0.0.2
File Size Uploaded Provenance
djangocms-4-migration-0.0.2.tar.gz 14.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for djangocms-4-migration 0.0.2
File Interpreter ABI Platform
djangocms_4_migration-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / djangocms-4-migration-0.0.2.tar.gz

Download URL djangocms-4-migration-0.0.2.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
10c20b0b06a5db6f772f71cf059a5bcc76d5b57da0e42b8a3a4d660d0e8883ea
BLAKE2b-256 checksum
How to use checksums
c6c2ed2a3fb8bbef78e1f2f8eb173745bda1dca389ffa06710614fb10f0cdd7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / djangocms_4_migration-0.0.2-py3-none-any.whl

Download URL djangocms_4_migration-0.0.2-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
501bb18e10a2fc80225cfe8c29fbe1a5e8318beb6cb4ef93eb47bb54a8fedd23
BLAKE2b-256 checksum
How to use checksums
fb7db212c748db07dc9d06044b4dbda914a4160b969d8f618a2204d6bebd4e6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Security for djangocms-4-migration 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page