django-uml
is a template repository for generating UML diagrams using Django.
The project utilizes django-extensions
's graph_model
command to generate UML diagrams.
Note: The project itself is not meant to run as a web application. Therefore, all files/settings that are normally used when setting up a Django web application, have been removed.
- Add your apps and models to the project
- Run
python manage.py uml
to generate a PNG-file depicting your UML diagram.
This project expects the user to have poetry
installed, to install it's requirements.
You can install poetry from here
To create uml diagrams, the graphviz
system packages are required. On Linux these can be installed with:
sudo apt-get install graphviz graphviz-dev
Since there is an example
app within the project,
you can follow these instructions to get started quickly:
-
Click on [Use this template] to create your repository
-
Clone your repository
git clone https://github.com/<your_github_name>/<your_repo_name>.git
-
Install the requirements using
poetry
(poetry
will create a virtualenv for you):poetry install
-
Copy
.env.example
to.env
to set your environment variables:cp .env.example .env
-
Run the command to generate a UML:
poetry run python manage.py uml
-
You should now have a UML.png file in
.exports/