Skip to main content

DjangoCMS Live-Draft Switch

Returns classic DjangoCMS-style live-draft switch to DjangoCMS.

Wait, what?

With 3.1 release, DjangoCMS crew decided to replace the fabulous live-draft toggle / switch with plain dumb boring buttons.

The change in 3.1.

I DON’T THINK SO!!!11number_one

This is a quick’n’dirty response to that change. It’s a JavaScript (jQuery, what else?!) hack that replaces those new buttons with something resembling the old toggle.

Toggle that this app provides.

Oh common, that’s not really a problem!

Well, it’s not, really. But IMHO it’s a step in the wrong direction, be it a tiny one. And anyways, I find it simpler to quickly whip up this app together then to explain to my clients that nothing has really changed.

But it’s different then it was

It’s improooooved :)

The differences are cosmetic. And I like to think this one is a bit better, because:

  • User can see what mode they are in, as well as what mode they will be switching to. This is not a big deal, but it just might help a new user with their first edit ever.

  • Orange Draft indicator is more visible then the classic gray dot.

Ok, how do I install this thing?

pip install djangocms-livedraftswitch

Add before cms app:

INSTALLED_APPS = (
    ...
    'djangocms-livedraftswitch',  # before cms app
    'cms',
    ...
)

If you don’t like Pypi, you can dump djangocms-livedraftswitch directory somewhere in PYTHONPATH.

Compatibility?

Not tested much really…

Works with DjangoCMS 3.1.2 and Django 1.7.9.

Browsers:

  • Google Chrome 64

  • Firefox 38

  • Safari 8.0.7 - animation is a bit jerky

  • IE 10+

  • IE 9 - no animation

Is that a demo project there?

If you clone this repo, you’ll get a full demo project. Not much of one, though, just a default DjangoCMS setup with this app installed. But this repo includes a SQLite database, so you can test it right away. Login with admin and admin.

Changes

development

0.2.5

Swapped “draft” and “live” positions to make it similar to original toggle, and also because it’s more natural this way.

0.2.4

Sorting out PyPi wierdness

0.2.0

First release

Metadata

Release files for djangocms-livedraftswitch 0.2.6

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-livedraftswitch 0.2.6
File Size Uploaded Provenance Actions
djangocms-livedraftswitch-0.2.6.tar.gz 8.7 kB Without provenance Details for djangocms-livedraftswitch-0.2.6.tar.gz

Release files / djangocms-livedraftswitch-0.2.6.tar.gz

Download URL djangocms-livedraftswitch-0.2.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4cf96140305d76013ae38f9b2ee0852c93675e20c398f15245264671b2eb7223
BLAKE2b-256 checksum
How to use checksums
cead9636975706077497a337349c17ab48cf5b2e2a131209ea6f1cdae022fdbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for djangocms-livedraftswitch 0.2.6

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.

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