Metadata-Version: 2.4
Name: django-lumen
Version: 0.2.0
Summary: Visualize Django models as an interactive ERD diagram in the browser
License: Copyright (c) 2026, Stjepan Zlodi
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors
           may be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: django>=3.2
Provides-Extra: dev
Requires-Dist: django; extra == 'dev'
Requires-Dist: pytest-django; extra == 'dev'
Description-Content-Type: text/markdown

# django-lumen

Visualize your Django models as an interactive ERD diagram in the browser. No external diagram library — the diagram is pure vanilla JS + SVG rendered at request time from the live Django model registry.

## Requirements

- Python 3.10+
- Django 3.2+

## Installation

```bash
pip install django-lumen
```

## Setup

1. Add `django_lumen` to `INSTALLED_APPS`:

```python
# settings.py
INSTALLED_APPS = [
    ...
    "django_lumen",
]
```

2. Mount the URLs in your root `urls.py`:

```python
# urls.py
from django.urls import path, include

urlpatterns = [
    ...
    path("lumen/", include("django_lumen.urls")),
]
```

3. Run migrations:

```bash
python manage.py migrate
```

4. Start the development server and open [http://localhost:8000/lumen/](http://localhost:8000/lumen/).

## Access control

The diagram is only accessible to users with `is_active = True` **and** `is_staff = True`. Other users are redirected to the login page.

## Default excluded apps

The following apps are hidden by default: `auth`, `admin`, `sessions`, `contenttypes`, `django_lumen`. Users can change this via the **Manage excluded apps** settings page or by right-clicking an app chip in the sidebar.
