Skip to main content
https://img.shields.io/pypi/l/django-model2puml https://img.shields.io/pypi/dm/django-model2puml https://img.shields.io/github/v/tag/sen-den/django-model2puml https://img.shields.io/pypi/v/django-model2puml https://img.shields.io/github/last-commit/sen-den/django-model2puml https://img.shields.io/github/commit-activity/m/sen-den/django-model2puml https://img.shields.io/github/languages/top/sen-den/django-model2puml https://img.shields.io/pypi/pyversions/django-model2puml https://img.shields.io/github/languages/code-size/sen-den/django-model2puml https://img.shields.io/maintenance/yes/2024 https://static.pepy.tech/badge/django-model2puml

django-model2puml app is a generator of project models structure in PlantUML class notation.

Quick start

  1. Add “uml_generator” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'puml_generator',
        ...
    ]
  2. Run django management command generate_puml like this ./manage.py generate_puml

Params:

--file - output file
--title - provide a title for diagram
--title-font-size - provide a custom title font size (default is 72)
--add-help - add models docstrings to diagram
--add-choices - add Choices description of fields to diagram
--split-choices - split Choices into per-model classes
--add-legend - include explanation of the symbols used
--add-omitted-headers - add a header stub for omitted foreign app
--omit-history - omit Historical* tables from django-simple-history
--omit - specify apps to be omitted in diagram
--include - specify apps to be included in diagram; other will be omitted
--headers-only - use only model header and relations, omit fields list
--url - generate URL to plantuml.com/plantuml/svg/YOUR_DIAGRAM
  1. Check generated PlantUML file!

./manage.py generate_puml --file diagram.puml --include auth contenttypes --add-help --add-legend

https://raw.githubusercontent.com/sen-den/django-model2puml/master/samples/sample-diagram-1.png

Release notes

v0.6.1 (2025-03-31)

  • Fix skip-choices-fields param to not fail if not provided

v0.6.0 (2024-10-20)

  • Add skip-choices-fields param to skip specified choices fields

  • Fix block direction to try to decrease mess in huge diagrams

v0.5.1 (2024-06-16)

  • Fix collect_choices to collect list[tuple] choices

v0.5.0 (2024-06-16)

  • Add split-choices flag to split choices into per-model classes

v0.4.1 (2023-02-13)

  • Fix usage of empty title not to break output filename

v0.4.0 (2023-02-11)

  • Add title-font-size param

v0.3.0 (2023-02-11)

  • Add URL to plantuml.com generation

v0.2.1 (2022-06-05)

  • Refine README.rst

v0.2.0 (2022-04-17)

v0.1.14 (2021-03-15)

  • Fix ImportError in utils.py

v0.1.13 (2020-10-17)

  • Add documentation to generator

  • Limit docstrings length

  • Fix choices generation issues

v0.1.12 (2020-10-15)

  • Use UTF-8 for saving output

v0.1.11 (2020-10-15)

  • Add headers-only flag to use only model header and relations, omit fields list in UML

Releases earlier than v0.1.11 yanked due to significant settings issues and must not be used

Release files for django-model2puml 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-model2puml 0.6.1
File Size Uploaded
django_model2puml-0.6.1.tar.gz 9.3 kB Details

Release files / django_model2puml-0.6.1.tar.gz

Download URL django_model2puml-0.6.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c7a986bb0e7ab22fd4dd18d6ff161c84e8c0a163dc783f17a9ca803ea5a747db
BLAKE2b-256 checksum
How to use checksums
1090e279585cc12fdb59c739504b1a99cb77123849043d07115a32d05b15f33b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.2 importlib-metadata/7.1.0 keyring/25.1.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.6.1 This release

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

2 release files

0.2.1

1 release file

0.2.0

1 release file

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page