Django Insights

Development

For contributors. The repository has a demo project (a fictional chat and billing app) with a lot of seeded data, so every chart type has something to show.

Set up #

  1. Install the dependencies with uv:

    uv sync
    
  2. Create the databases, fill them and collect the insights:

    make migrate
    make seed
    make collect_insights
    
  3. Start the server and open http://localhost:8000/. The demo serves the dashboard at the root and logs you in automatically.

    make rs
    

make clean deletes the databases and migrates again.

Tests and checks #

make lint

This runs ruff, ty and pytest, and pytest fails under 90% coverage. uv run tox run runs the whole matrix (Python 3.11 to 3.14, Django 5.2 to 6.1, and the lowest supported versions).

The dashboard stylesheet #

The dashboard uses Basecoat compiled with Tailwind 4, one stylesheet per style. After you change a template class or the sources, rebuild them:

cd django_insights/packages
pnpm install
pnpm build

The theme colors #

django_insights/palettes.py is generated from the shadcn/ui themes, do not edit it by hand. See Theming.

These docs #

The docs are built with dokk from the docs folder.

uv run dokk serve
uv run dokk check

Pushing to main builds and publishes them to GitHub Pages.