Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/rahul-baberwal/django-var-cms/llms.txt

Use this file to discover all available pages before exploring further.

django-var-cms gives Django projects a modern, customizable administrative Control Panel and CMS registry — without replacing your existing apps. Drop a var_cms_admin.py file in any app, register your models, configure per-role permissions, and go. The panel ships with a glassmorphic dark-mode UI, a Quill.js rich-text editor, built-in image cropping, media format conversion, and optional email OTP two-factor authentication.

Installation

Install via pip or uv and wire up INSTALLED_APPS, URL routing, and media paths in minutes.

Quickstart

Register your first model and see it live in the dashboard with a complete working example.

Permissions

Configure fine-grained add, list, view, edit, and delete access per role or per user.

API Reference

Full reference for VarCMSModelAdmin, VarCMSSite, permissions classes, and all settings.

What’s included

Auto-Discovery

Any var_cms_admin.py file in an installed app is found and loaded automatically on startup — no registration boilerplate.

Role-Based Permissions

Grant or deny add, list, view, edit, and delete per Django group or per individual user.

Rich Text Editor

Integrated Quill.js HTML editor activates on any TextField by setting html_fields.

Image Cropper

Built-in modal cropper with rotate, flip, and custom aspect-ratio controls, backed by Pillow.

Media Conversion

Convert images, audio, and video between formats via built-in API endpoints.

Custom Actions

Add one-click actions (Approve, Send Email, etc.) to list and detail views with a single callable.

Get started in three steps

1

Install the package

pip install django-var-cms pillow whitenoise
2

Register the app and URLs

Add "var_cms" to INSTALLED_APPS and mount the URLs at any path — conventionally /var-cms/.
settings.py
INSTALLED_APPS = [
    # ...
    "var_cms",
]
LOGIN_URL = "/var-cms/login/"
LOGIN_REDIRECT_URL = "/var-cms/"
3

Register your first model

Create myapp/var_cms_admin.py and the panel auto-discovers it on the next startup.
myapp/var_cms_admin.py
from var_cms.registry import var_cms_site, VarCMSModelAdmin
from .models import Article

class ArticleAdmin(VarCMSModelAdmin):
    list_display = ["title", "status", "created_at"]
    search_fields = ["title", "body"]

var_cms_site.register(Article, ArticleAdmin)
django-var-cms requires Django ≥ 5.0 and Python ≥ 3.11. Pillow and WhiteNoise are required runtime dependencies.

Build docs developers (and LLMs) love