Skip to main content

pypi coverage PyPI - Python Version PyPI - Django Versions from Framework Classifiers PyPI - django CMS Versions from Framework Classifiers

django CMS History is an addon application to provide undo/redo functionality in django CMS, by maintaining content history.

Some of the functionality in this application was previously included in django CMS itself. However, it became apparent that some users did not want it, and some wanted functionality that worked differently.

In keeping with the django CMS philosophy of maintaining only core CMS functionality as part of the package itself, history management was removed from django CMS in version 3.4 and has been spun off into an independent application.

django CMS History has been rewritten from the ground up. It will continue to be developed. New functionality and improvements will be introduced in future releases.

preview.jpg

Contribute to this project and win rewards

Because this is an open-source project, we welcome everyone to get involved in the project and receive a reward for their contribution. Become part of a fantastic community and help us make django CMS the best CMS in the world.

We’ll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.

We’re grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

Documentation

Version support

djangocms-history 3.x supports Python 3.9 through 3.13, Django 4.2, 5.2, 6.0 and 6.1, and django CMS 4.1, 5.0 and 5.1. If you are using django CMS 3.x, use djangocms-history 2.x.

The supported Python, Django and django CMS versions are shown by the badges at the top of this page (latest release read directly from the published PyPI classifiers). The latest supported versions of the master branch are declared in pyproject.toml; the tested combinations are defined in tox.ini and tests/requirements.

Installation

For a manual install:

  • run pip install djangocms-history

  • add djangocms_history to your INSTALLED_APPS

  • run python manage.py migrate djangocms_history

Configuration

Once installed, django CMS History will make new options available to the web content manager. These will be visible in the django CMS toolbar when managing content that is supported by the application.

In-place updates

On django CMS 5.1 and later, undo and redo update the structure board in place (through the data bridge the endpoints return), preserving scroll position and board state. On earlier versions the page is reloaded after each undo/redo instead.

History scope and limitations

History records plugin operations rather than arbitrary model or page changes. Undo/redo is available for the last 24 hours and for one content origin per user session. Editing another page supersedes the previous page’s history; another user’s edit supersedes history only when it affects the same content. Changing a plugin with a many-to-many relation clears the history for that content because the change cannot be restored reliably.

Operations older than 24 hours are ignored, but age alone does not immediately delete or archive their database rows. Superseded operations and operations from an earlier login session are retired when the corresponding cleanup path runs.

Retiring operations: archive or delete

By default retired operations are deleted outright. If you would rather retain them for inspection, enable archiving:

DJANGOCMS_HISTORY_ARCHIVE_OPERATIONS = True

Archived operations are flagged with is_archived=True and are still never used by undo/redo. They are not durable audit records: deleting related users, placeholders or other referenced content may delete them through database cascades. To remove archived operations later and reclaim database space, run:

python manage.py purge_archived_operations

The command supports --days N (only purge archived operations older than N days) and --dry-run (report what would be deleted without deleting).

djangocms-versioning

When djangocms-versioning is installed, undo/redo only operates on content that is editable, i.e. on draft versions. Once a version has been published, operations recorded on its draft can no longer be undone or redone; the toolbar buttons are disabled and the endpoints refuse to modify the published content.

Running Tests

The test suite uses pytest (with pytest-django). You can run tests by executing:

python -m venv env
source env/bin/activate
pip install -r tests/requirements/dj52_cms50.txt -e .
pytest

Run with djangocms-versioning installed:

pip install djangocms-versioning
VERSIONING=1 pytest

Release files for djangocms-history 3.0.0

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-history 3.0.0
File Size Uploaded
djangocms_history-3.0.0.tar.gz 49.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djangocms-history 3.0.0
File Interpreter ABI Platform
djangocms_history-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 97.1 kB

Release files / djangocms_history-3.0.0.tar.gz

Download URL djangocms_history-3.0.0.tar.gz
Size 49.2 kB
Tags Source
SHA-256 checksum
How to use checksums
229d5fabd7633d3a7c779e1928a4f37a862d3b9162ad705edfeb8b9d2eeb2c18
BLAKE2b-256 checksum
How to use checksums
85d66164394e269902e2fe8a64192d94e89d3598e4bae5e9cfc4c3647a20d1ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / djangocms_history-3.0.0-py3-none-any.whl

Download URL djangocms_history-3.0.0-py3-none-any.whl
Size 47.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
722125d1b4da39ced7190806e847b7a271bf94f40ee31f7bc5126a29cbe385f7
BLAKE2b-256 checksum
How to use checksums
38e5aece1cd90af8a0a22c50c56cab464f1c2297c4ffda5c7f1293ec90b027ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.6.0

1 release file

0.5.3

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

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