DjangoLux - A modern UX/UI framework for Django: a themeable, multilingual design system plus batteries-included app infrastructure (auth, CRUD, audit, navigation).
Project description
DjangoLux — A Modern UX/UI Framework for Django
Open DjangoLux Agent on ChatGPT
Specialized custom GPT for django-lux integration, configuration, extension, and troubleshooting.
DjangoLux is an extensive UX/UI framework for Django — a complete, design-first playground for building modern web apps. It ships a polished, themeable design system on top of Bootstrap 5 (multiple built-in themes, full RTL/LTR + multilingual support, custom font management, and theme/language/direction-aware components) and pairs it with the batteries a real application needs: a first-launch setup wizard, user management and security, scopes, navigation, activity logging, guided onboarding, data export, and zero-boilerplate CRUD tooling.
Think of it as a cohesive foundation rather than a themed admin shell — instead of assembling auth, theming, tables, forms, navigation, and auditing yourself, you get them wired together and configurable at runtime, so you can focus on your app's actual features. The package keeps the landing README short; long-form operating and integration guidance lives at docs/.
What DjangoLux gives you
- A complete, themeable design system on Bootstrap 5: multiple built-in themes with a shared theme registry, full RTL/LTR and multilingual rendering, custom font management, responsive layouts, reusable components (tables, forms, modals, selectors, sidebar, navbar, tutorials), and theme/language/direction-aware surfaces — all driven by a single
dluxtoken vocabulary. - A first-launch setup wizard at
/sys/setup/for identity, explicit language catalog management, translation-matrix overrides, access/security toggles, UI-first Dlux email delivery, themes, default table density, global home URL, and sidebar structure, including full sidebar disable, runtime sidebar-toolbar, and user-reordering controls. - A runtime system UI for users and superusers, including Options, user management, profiles, 2FA, activity logs, scopes, and system settings.
- A disabled-by-default public registration playground for email-first local signup with mandatory email verification, Dlux email readiness checks, public-account provenance badges, throttles, and optional approval.
- A database-backed
SystemSettingssingleton layered overDLUX_CONFIG, so projects can seed defaults in code and refine them in the UI later. - A framework-owned
django_tables2platform that auto-adopts stock tables, ships built-in pagination and per-page controls, exposes a publicDluxTablebase class, and supports per-tabledlux_table,dlux_density,dlux_per_page, anddlux_actionsoverrides. - A
ScopedModelbase with audit fields, soft-delete behavior, actor tracking, filtered managers, and automatic scope handling. - Zero-boilerplate sections and dynamic modal CRUD flows for auxiliary models, plus a reusable context-menu/event model for richer interactions.
- A built-in audit trail with signal-based logging, merged User/Profile updates, diff capture, masked sensitive fields, and download/export log entries.
- Universal data helpers such as
fetch_file,fetch_excel, sticky-form autofill, tutorial overlays, and persistent UI preferences.
Requirements
The runtime dependencies below are installed automatically with django-lux.
- Python 3.11+
- Django 5.1+
django-crispy-formscrispy-bootstrap5django-tables2django-filterpillow"for image handling"babel"for translations"psutil"for system monitoring"pyotp"for TOTP 2FA"qrcode"for TOTP 2FA QR codes"cryptography"for encrypted TOTP and SMTP secret storage"openpyxl"for XLSX exports"packaging"for version and requirement validation"
Generated Compose projects install the optional django-lux[updater] extra for
PyPI provenance verification. Manual and non-Compose installs do not need that
extra unless they deliberately adopt the generated updater architecture.
Installation
pip install django-lux
# OR
pip install git+https://github.com/debeski/django-lux.git
Scaffold a New Project or App
python -m dlux startproject myproject
cd myproject
python -m dlux startapp billing --register
python -m dlux startproject creates a new Django project already wired for DjangoLux. python -m dlux startapp creates a DjangoLux-native app skeleton with models, forms, filters, tables, translations, templates, tests, and optional project registration.
Generated projects also include a baseline Docker stack with compose.yml, compose.dev.yml, a config/celery.py worker entrypoint, a /health/ endpoint via django-health-check, and the verified dlux-updater service with its persistent runtime volume and nginx maintenance fallback.
They also generate .secrets/.env with the bootstrap secrets used by the standard decrypter/startup flow.
The scaffolded settings baseline now also includes django-cors-headers and django-csp with their apps, middleware, and starter CORS/CSP policy settings.
Inline updates are enabled only by the recognized generated Compose baseline.
Other installations keep DLUX_INLINE_UPDATES_ENABLED=False unless they are
explicitly migrated with the guarded bootstrap described in the
Verified Inline Updater guide.
Minimal Quick Start
- Add the DjangoLux helper at the end of your project
settings.py.
from dlux.utils import dlux_settings
dlux_settings(globals())
That helper prepends the required apps, inserts django.middleware.locale.LocaleMiddleware and dlux.middleware.DluxMiddleware in the supported order, adds the Dlux context processor, sets the Crispy Bootstrap 5 defaults, adds a Bootstrap-friendly MESSAGE_TAGS error mapping, and seeds the standard DjangoLux runtime defaults for language, timezone, i18n/tz flags, FORMAT_MODULE_PATH, and charset unless your project already defines them.
Proceed to Getting Started if you prefer to wire everything manually.
Public registration is documented separately at Public Registration Playground. It is disabled by default and is not part of the optional SSO packages.
- Mount
dlux.urlsat project root so the bundled auth and system routes stay at/accounts/...and/sys/....
from django.urls import include, path
urlpatterns = [
path("", include("dlux.urls")),
]
With that root include in place, dlux provides /accounts/... and /sys/.... If your project does not define its own / view, dlux falls back from an unresolved / request into its login/setup flow instead of leaving a 404. On a fresh and unconfigured install, Dlux also guards ordinary anonymous requests so a public root page cannot bypass first-time setup; once setup is complete, your existing root view continues to behave normally.
- Run the setup command.
python manage.py dlux_setup
- Sign in as a superuser and complete the first-launch wizard at
/sys/setup/. On a fresh install, an anonymous request may be sent through/sys/setup/and then to login before the wizard can be completed. After setup, the main runtime UI lives underuser_hub.
For a fuller setup path, prefix-mount guidance, and first-launch expectations, use the Getting Started guide.
Key Capabilities
- Onboarding and runtime configuration: first-launch setup wizard, Options view, runtime System Settings modal, source-tabbed translation overrides, setup import/export, language/theme defaults, and a global Home destination.
- User and security operations: interactive user wizard, grouped translated permissions, four-tier staff authorization (superuser, Global Staff, Central Staff, Scoped Staff), permission-based sidebar visibility, profile management, multiple 2FA flows (App, Email, Backup), trusted device tracking for 30 days, and runtime preference persistence.
- Generic CRUD infrastructure: dynamic sections, AJAX-driven modal CRUD, automatic form/table/filter discovery, context-menu actions, and reusable event dispatch.
- Navigation and UI infrastructure: resolver-driven sidebar builder with permission-based visibility, runtime tree rendering, optional user-level reordering, configurable sidebar toolbar visibility, a shared theme registry, tutorial overlays, theme-aware system surfaces, and template injection hooks.
- Data movement and productivity helpers: universal file download, Excel export, smart autofill, sticky-form cloning, and generic list/filter helpers.
- Audit and governance: signal-based activity logging with configurable IP resolution (direct/proxy/header), diff capture, masked sensitive fields, deduplicated entries, download/export logging, and scoped visibility.
- Optional SSO:
django-lux-ssoanddjango-lux-sso-clientlive as separate optional packages for OIDC provider/client deployments without changing core Dlux runtime behavior. - Standalone backup viewer:
tools/dlb-viewer/is a dependency-free, cross-platform binary for inspecting encrypted.dlbsystem backups offline — browse models, rows, and stored files without a running instance. Prebuilt binaries ship with each release. - Full-system backup policy: superusers can configure scheduled encrypted backups, storage-relative export targets, and age/count rotation from System Settings; inline updates and rollbacks require a verified pre-maintenance backup.
- Framework-level automation: translation patches, scoped-model auto-injection, actor tracking, soft-delete, and config layering across defaults, project settings, and runtime UI.
- Verified generated-Compose updates: daily stable-release checks, superuser-approved staged updates, maintenance/backup handling, process generation restarts, and compatible code/static rollback without rebuilding the project image.
Documentation
- Documentation Hub
- Security Policy
- Contributing Guide
- Code of Conduct
- Getting Started
- Admin Guide
- Developer Guide
- Customization Guide
- Reference
- DSRP-1 Security Standard
- Optional SSO Packages
- Standalone .dlb Backup Viewer
- Verified Inline Updater
- Releasing — tag-driven PyPI + GitHub release flow
- Migrating from django-microsys — in-place upgrade for existing deployments
- Features — complete feature inventory
- Changelog
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_lux-1.2.14.tar.gz.
File metadata
- Download URL: django_lux-1.2.14.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5755c875371f0cdce55f699876ae8f8052d829f55fd9cac2450e0359d88ff307
|
|
| MD5 |
0563e4ca09814a65a44d29b5eb94c5ad
|
|
| BLAKE2b-256 |
bd10dbc3c4000483333132f7bfeeceb12227bdea8f0a07a9952fee632d09f5b8
|
Provenance
The following attestation bundles were made for django_lux-1.2.14.tar.gz:
Publisher:
release.yml on debeski/django-lux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_lux-1.2.14.tar.gz -
Subject digest:
5755c875371f0cdce55f699876ae8f8052d829f55fd9cac2450e0359d88ff307 - Sigstore transparency entry: 2024516387
- Sigstore integration time:
-
Permalink:
debeski/django-lux@35f5e9dab558391c1f8d0d3cdd164ff1c2feb06d -
Branch / Tag:
refs/tags/v1.2.14 - Owner: https://github.com/debeski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@35f5e9dab558391c1f8d0d3cdd164ff1c2feb06d -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_lux-1.2.14-py3-none-any.whl.
File metadata
- Download URL: django_lux-1.2.14-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cbb3995ab35d5dfc109750b409a64102cae1903051e7b50569f99ff083411a1
|
|
| MD5 |
17b2129d1e130b157c9a4f3d250ce941
|
|
| BLAKE2b-256 |
27b6f0f0b7a5bdddb60661d97b56fa28b545b14d7f723459730dca76e26fe917
|
Provenance
The following attestation bundles were made for django_lux-1.2.14-py3-none-any.whl:
Publisher:
release.yml on debeski/django-lux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_lux-1.2.14-py3-none-any.whl -
Subject digest:
8cbb3995ab35d5dfc109750b409a64102cae1903051e7b50569f99ff083411a1 - Sigstore transparency entry: 2024516487
- Sigstore integration time:
-
Permalink:
debeski/django-lux@35f5e9dab558391c1f8d0d3cdd164ff1c2feb06d -
Branch / Tag:
refs/tags/v1.2.14 - Owner: https://github.com/debeski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@35f5e9dab558391c1f8d0d3cdd164ff1c2feb06d -
Trigger Event:
push
-
Statement type: