skillfed

django-diagram

Generate an Entity Relationship Diagram for a Django project in Mermaid format

django-diagram v0.0.1 86.6K downloads/30d#13,853 on PyPI31
License unclear All Rights Reserved DORMANT released

What it is and what it does

django-diagram is a command-line tool that reads your Django project's models and generates an Entity Relationship Diagram in Mermaid format. It introspects your Django settings and model definitions, then outputs a text-based diagram showing tables and their relationships. You run it as a Django management command by pointing it to your settings module, optionally filtering to a single app or writing to a file instead of stdout.

The tool is a thin wrapper around Django's model introspection; it has no external dependencies beyond Django itself. It's useful for documenting database schemas or quickly visualizing how your models relate to each other. However, the project is dormant—the single release was in February 2023 and has not been updated since, so it may not work with recent Django versions or handle all modern model patterns.

Use it for:

  • Generate a quick visual reference of your Django app's database schema for documentation or team onboarding.
  • Export a Mermaid diagram of a single Django app's models to embed in README or design docs.
  • Verify model relationships and foreign keys at a glance without manually reading model code.
  • Create a baseline ER diagram when inheriting or auditing an existing Django project.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates Entity Relationship Diagrams in Mermaid format from Django project models by introspecting your Django configuration.

Yes, if you need a one-off diagram of a Django project's models and are comfortable with a dormant tool. The install is frictionless and it does what it claims. No, if you depend on ongoing maintenance or need compatibility with recent Django versions—the last update was over two years ago. Verify the unclear license before using in production or commercial work.

Install

django-diagram on PyPI

pip

pip install django-diagram

uv

uv add django-diagram

poetry

poetry add django-diagram

Installing django-diagram

Before you install

Low friction: pure Python wheel with only django as a runtime dependency. Maintenance is dormant—last commit was 2024-01-04 and no updates since the single 0.0.1 release on 2023-02-18, so expect no bug fixes or Django version compatibility updates.

License in practice

License is marked 'All Rights Reserved' with no SPDX identifier, making its legal status unclear. Verify with the repository or author before using in commercial or redistributed work.

Quickstart

pip install django-diagram
python -m django_diagram --settings=myproject.settings --output=diagram.txt

Requires DJANGO_SETTINGS_MODULE environment variable or --settings argument pointing to a valid Django settings module.

Verify before relying

  • Whether 'All Rights Reserved' license permits use in proprietary or open-source projects—contact author or check repository for clarification.
  • Compatibility with Django versions released after 2024-01-04 (LTS releases 4.2+, 5.0+).
  • Whether the tool handles complex model relationships (many-to-many, through tables, abstract models) correctly.

Package facts

License All Rights Reserved (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — django
Maintenance dormant — 1,273 days since the last release
Last repo commit
First released
Downloads 86,561/month — #13,853 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_diagram-0.0.1-py3-none-any.whl

Environment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic Content

Tags

django model diagram generatorentity relationship diagram djangomermaid erd from django modelsvisualize django database schemadjango project visualizationauto-generate database diagramdjango model relationships
djangovisualizationdocumentation

More WWW/HTTP packages