Skip to content

Thijss/django-uml

Repository files navigation

django-uml

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.

How to use this project

  1. Add your apps and models to the project
  2. Run python manage.py uml to generate a PNG-file depicting your UML diagram.

Prerequisites

Poetry

This project expects the user to have poetry installed, to install it's requirements. You can install poetry from here

Graphviz

To create uml diagrams, the graphviz system packages are required. On Linux these can be installed with:

sudo apt-get install graphviz graphviz-dev

Quickstart

Since there is an example app within the project, you can follow these instructions to get started quickly:

  1. Click on [Use this template] to create your repository

  2. Clone your repository

    git clone https://github.com/<your_github_name>/<your_repo_name>.git
  3. Install the requirements using poetry (poetry will create a virtualenv for you):

    poetry install
  4. Copy .env.example to .env to set your environment variables:

    cp .env.example .env
  5. Run the command to generate a UML:

    poetry run python manage.py uml
  6. You should now have a UML.png file in .exports/

Example UML.png

UML diagram

About

A boilerplate project for generating UML diagrams using Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published