Install & Compatibility
Where this runs
tested against v5.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 150.5MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 9.3s · import 0.000s · 151MB
155MB installed
● package 155MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Page
✓ from cms.models import Page
Import the Page model for custom logic or linking.
CMSPluginBase
✓ from cms.plugin_base import CMSPluginBase
Base class for creating custom plugins.
apphook_pool
✓ from cms.apphook_pool import apphook_pool
Registers and manages Apphooks.
toolbar_pool
✓ from cms.toolbar_pool import toolbar_pool
Registers and manages toolbar items.
PlaceholderField
✓ from cms.models.fields import PlaceholderField
Use this field type in custom Django models to embed CMS placeholders.
This quickstart outlines the minimal configuration for integrating Django CMS into an existing Django project. It includes essential `INSTALLED_APPS`, `MIDDLEWARE`, `TEMPLATES` context processors, a basic `urls.py` setup, and a simple `base.html` template. After configuring, run `python manage.py makemigrations` (if needed), `python manage.py migrate`, `python manage.py createsuperuser`, and `python manage.py collectstatic`. Then start the server and navigate to `/admin` to create your first page.
# settings.py
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
INSTALLED_APPS = [
'djangocms_admin_style', # Must be before django.contrib.admin
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites', # Required by CMS
'cms', # Must be before 'menus'
'menus', # Must be before 'sekizai'
'sekizai', # Required for JS/CSS resource management
'treebeard', # Required by CMS for page trees
'djangocms_text_ckeditor', # Example plugin
# Add your project apps here
]
SITE_ID = 1
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'cms.middleware.utils.ApphookReloadMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.page.PageMiddleware',
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
],
},
},
]
DEBUG = True
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'insecure-dev-key-please-change-this')
ALLOWED_HOSTS = ['*']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('cms.urls')), # This must be the last URL pattern
]
# templates/base.html
# (create this file in your project's 'templates' directory)
{% load cms_tags sekizai_tags menu_tags %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% page_attribute "page_title" default_value="My Site" %}</title>
{% render_block "css" %}
</head>
<body>
{% cms_toolbar %}
<header>
<h1><a href="/">My Django CMS Site</a></h1>
{% show_menu 0 100 100 100 %}
</header>
<main>
{% placeholder "content" %}
</main>
<footer>
{% render_block "js" %}
</footer>
</body>
</html>
djangocms --version
Upgrade
Version history
5.0.8latest on PyPI · released Jun 10, 2026
Audit
Dependencies
DjangorequiredCore web framework
PillowrequiredImage processing for media management
django-treebeardrequiredEfficient tree structure implementation for pages and menus
django-sekizairequiredManages CSS and JavaScript resources