Skip to main content

A django CMS 3 to 4 migration package

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-4-migration-0.0.2.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

djangocms_4_migration-0.0.2-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file djangocms-4-migration-0.0.2.tar.gz.

File metadata

  • Download URL: djangocms-4-migration-0.0.2.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for djangocms-4-migration-0.0.2.tar.gz
Algorithm Hash digest
SHA256 10c20b0b06a5db6f772f71cf059a5bcc76d5b57da0e42b8a3a4d660d0e8883ea
MD5 60c53b4a63786242fc152affb86812d8
BLAKE2b-256 c6c2ed2a3fb8bbef78e1f2f8eb173745bda1dca389ffa06710614fb10f0cdd7c

See more details on using hashes here.

File details

Details for the file djangocms_4_migration-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_4_migration-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 501bb18e10a2fc80225cfe8c29fbe1a5e8318beb6cb4ef93eb47bb54a8fedd23
MD5 2e72b045038b0c1da1a0bbead83f8b6b
BLAKE2b-256 fb7db212c748db07dc9d06044b4dbda914a4160b969d8f618a2204d6bebd4e6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page