django-model2puml app is a generator of project models structure in PlantUML class notation.
Add "uml_generator" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'puml_generator', ... ]
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
- Check generated PlantUML file!
./manage.py generate_puml --file diagram.puml --include auth contenttypes --add-help --add-legend
- Fix collect_choices to collect list[tuple] choices
- Add split-choices flag to split choices into per-model classes
- Fix usage of empty title not to break output filename
- Add title-font-size param
- Add URL to plantuml.com generation
- Refine README.rst
- Add omit-history flag for omit django-simple-history library models
- Fix ImportError in utils.py
- Add documentation to generator
- Limit docstrings length
- Fix choices generation issues
- Use UTF-8 for saving output
- 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