djangocms-rest

Latest PyPI version Test coverage Python versions Django versions django CMS versions License

Headless content delivery for django CMS — serve your content as a typed, read-only REST API.

djangocms-rest turns an existing django CMS project into a headless backend: editors keep the django CMS editing interface, while your frontend consumes content as read-only JSON.

Key features

Zero-config

Every django CMS plugin serializes to JSON automatically — no API code to write.

Editing stays put

Editors keep the full django CMS interface; the API is read-only.

Complete content model

Pages, placeholders, plugins, menus, breadcrumbs and search — all over the API.

Typed & standards-based

Optional drf-spectacular emits an OpenAPI 3 schema and browsable docs for fully typed clients (React, Vue, Svelte, Astro, …).

Multi-language & multi-site

Per-language endpoints and per-site content resolution out of the box.

Built on DRF

Extend it with your own Django REST framework serializers and permissions.

Where to start

🚀 Tutorial

Start here. A single hands-on lesson that takes you from an empty project to fetching real page content over the API.

🔧 How-to guides

Goal-oriented recipes: enable CORS, serve multiple sites, access draft content, generate the OpenAPI schema, and serialize custom plugins.

📖 Reference

Exact endpoint descriptions — paths, parameters, response fields and examples for every endpoint.

💡 Explanation

The concepts behind the API: the content model, preview & versioning, plugin serialization, multi-site, and caching.

Note

New to headless django CMS? Read Headless django CMS first to understand what you are building and why, then follow the Tutorial.