Skip to main content

Django Control Room Panel Tests codecov PyPI version Python versions Downloads License: MIT

dj-control-room-base

dj-control-room-base - a core library for creating DCR panels

dj-control-room-base is a core library for Django Control Room panels. It provides the shared primitives that every panel needs: settings management, CSS injection, permission enforcement, admin sidebar integration, template context helpers, and MCP-style panel tools.

Official Django Control Room panels ship with this package as a dependency and build on these APIs rather than reimplementing them panel by panel.

Optionally, the package can also be mounted as a full panel in its own right: it ships a bundled design system reference UI and example patterns that are useful when building or theming new panels.

What this library provides

  • Centralized CSS and permissions - a single PanelConfig object per panel drives CSS injection, staff/group/superuser checks, and settings merging across built-in, panel, hub, and project layers.
  • Admin sidebar integration - PanelPlaceholderModel and BasePanelAdmin give any panel a sidebar entry with no extra migrations.
  • Template context helpers - panel_config.get_context(request, ...) returns a ready-to-use context with CSS and Django admin variables included.
  • Entry-point discovery - panels register with the hub via a PanelPlugin subclass and a pyproject.toml entry point.
  • Panel tools - optional, permission-scoped callables the dj-control-room hub aggregates for AI agent and in-admin chat integrations.
  • Theme adapters - stylesheets that match panels to django-unfold, django-jazzmin, django-grappelli, django-admin-interface, or django-admin-dracula, auto-selected from INSTALLED_APPS when THEME_AUTO_DETECT is enabled (default). Known unsupported skins get a general-light or general-dark pin instead of following OS color-scheme alone.

See the full documentation for configuration options and a guide to building your own panel on this library.

Requirements

  • Python 3.9+
  • Django 4.2+ (tested in CI across Django 4.2, 5.2, and 6.0)

Quick start

pip install dj-control-room-base
# settings.py
INSTALLED_APPS = [
    ...
    "dj_control_room_base",
]
# urls.py
urlpatterns = [
    path("admin/dj-control-room-base/", include("dj_control_room_base.urls")),
    path("admin/", admin.site.urls),
]
python manage.py migrate
python manage.py runserver

Open /admin/ and sign in. A DJ CONTROL ROOM BASE entry appears in the sidebar and links to the panel at /admin/dj-control-room-base/.

See Installation for the complete walkthrough, Configuration for CSS/permission settings and theme adapters, and Building Panels for a guide to building your own panel on this library.

Development

git clone https://github.com/django-control-room/dj-control-room-base.git
cd dj-control-room-base
make install
make test_local

See Development for Docker setup, coverage, and the full Makefile reference.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dj_control_room_base-1.5.0.tar.gz (141.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dj_control_room_base-1.5.0-py3-none-any.whl (153.2 kB view details)

Uploaded Python 3

File details

Details for the file dj_control_room_base-1.5.0.tar.gz.

File metadata

  • Download URL: dj_control_room_base-1.5.0.tar.gz
  • Upload date:
  • Size: 141.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dj_control_room_base-1.5.0.tar.gz
Algorithm Hash digest
SHA256 299bfb1e887c4d9cc024c478f05166185fad7520a0c1a5995b51501871598337
MD5 7942532aa55e354b21c2a4298fad875b
BLAKE2b-256 39974a8adf1a97de8a367358f706d683356839fa84ac1c1f3189e6d84a9b4fbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dj_control_room_base-1.5.0.tar.gz:

Publisher: python-publish.yml on django-control-room/dj-control-room-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dj_control_room_base-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dj_control_room_base-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 983edf919b99d6afe789abab7bc91568105a669780c92f78f9038b72fdb23d34
MD5 677f3167b6fd082d46b9f5895035a07b
BLAKE2b-256 be530fd87edfde7868f21fc49373e603d0704c2670d8ef8ff357a09e0781cd84

See more details on using hashes here.

Provenance

The following attestation bundles were made for dj_control_room_base-1.5.0-py3-none-any.whl:

Publisher: python-publish.yml on django-control-room/dj-control-room-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page