djangocms-custom-content

Custom content types for django CMS — without the boilerplate.

Building a custom content type in django CMS by hand means wiring up a grouper, versioning, a grouper admin, frontend editing, an app hook and migrations yourself. djangocms-custom-content does all of that — you write the model.


✍️ Write this…

from django.db import models
from djangocms_custom_content.models import AbstractCustomGrouper, AbstractCustomContent

class Article(AbstractCustomGrouper):
    pass

class ArticleContent(AbstractCustomContent):
    article = models.ForeignKey(Article, on_delete=models.CASCADE)
    language = models.CharField(max_length=10)
    slug = models.SlugField()
    title = models.CharField(max_length=200)
    body = models.TextField()

    class CMSConfig:
        enable_versioning = True
        enable_frontend_editing = True
        apphook = True

…and that model (plus a few lines of grouper admin) gives you, for free:

  • 📝 per-language draft/publish version history

  • 🖱️ frontend, double-click editing inside the page

  • 🔗 a detail view at a clean URL, with get_absolute_url() injected

  • 🗂️ a grouper admin to create and manage content

Want related content? Add one line to the grouper — authors = RelationField("people.Person", ordered=True) — and the admin renders a sortable autocomplete, anchored to the grouper so the link survives every new version.

Note

Status: 0.5 — usable, pre-1.0. The relations system is a ground-up rewrite and the framework runs the bundled apps and test suite, but APIs may still shift before 1.0. Feedback and bug reports are very welcome.


🚀 See it work in two minutes

Don’t build anything yet — turn on a bundled example and click around first.

pip install djangocms-custom-content

Add the blog (plus the apps it relates to) to INSTALLED_APPS and migrate:

INSTALLED_APPS = [
    # ... django CMS and its dependencies ...
    "djangocms_custom_content",
    "djangocms_custom_content.contrib.people",
    "djangocms_custom_content.contrib.categories",
    "djangocms_custom_content.contrib.blog",
]
python manage.py migrate

That’s it. You now have a versioned, frontend-editable blog in the admin, with sortable authors and categories relations and ready-to-place CMS plugins — no models written. Poke at it, then build your own.

Ready to build your own? → Create your first model in 5 minutes

Tip

No django CMS project yet? Follow the django CMS installation guide first, then come back. Curious how a bundled piece works? Each app has a short tour: blog, people, categories, services.


🧭 Choose your path

🚀 Tutorials

Step-by-step lessons. Install the package, create your first content model, then add plugins, an app hook and relations.

Tutorials
🛠 How-to guides

Goal-oriented guides: register the grouper admin, expose content at a URL, declare relations, and enable versioning.

How-To Guides
🧠 Explanation

The concepts behind the framework: the grouper/content pattern and how grouper-anchored relations work.

Explanations
📖 Reference

Authoritative API reference: classes, managers, functions, and the CMSConfig options.

Reference

✨ Key Features

  • Write the model, skip the plumbing — versioning, grouper admin, frontend editing, app hooks and migrations are handled (Installation and Example)

  • Relations that survive versioning — related content is anchored to the grouper, so links don’t break when a new version is published (Relations Explained)

  • Sortable related-content widgets, free — every relation renders as an autocomplete multi-select in the admin, drag-sortable when ordered (Register the grouper admin)

  • Relate to anything without touching it — generic relations need no foreign key or migration on the target model (Set Up Many-to-Many Relations)

  • Multi-language & versioned — per-language draft/publish history per content model (Implement Content Versioning)

  • Batteries included — bundled blog, people, categories and services apps to use as-is or copy and adapt (Using the contrib.blog module)

  • django CMS 5.0+ — compatible with modern django CMS and Django versions

Contents