Skip to main content

A Django management command to generate a graph of a model and its neighbors up to a specified depth.

Project description

Django Graph Models Command

This package provides a Django custom management command to generate a graph of a model and its neighbors up to a specified depth.

Installation

  1. Make sure Graphviz is installed

sudo apt-get update && sudo apt-get install graphviz graphviz-dev

  1. Install the package using pip:

pip install django-db-modeler

  1. Add the app to your Django project's INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'db_modeler',
]

Usage

python manage.py model_db your_app.ModelName depth 1 --output output_file.svg

Options

  • model_name: The name of the model to visualize.
  • depth: The depth of relationships to include.
  • --output: The output file name.
  • --theme: The theme to use for the graph (default: original).
  • --layout: The layout of the graph (default: dot).

Example

python manage.py model_db product.Product 0 --output model.svg

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-db-modeler-0.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_db_modeler-0.1.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file django-db-modeler-0.1.4.tar.gz.

File metadata

  • Download URL: django-db-modeler-0.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for django-db-modeler-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b0830c376dfdd1b94cdceb171709c1a15663395b84b8bc0b52b37c80c13f2b79
MD5 992114cc9dce3e1392195cff99d41e14
BLAKE2b-256 96a2a67fe7c6b5b73efdd6f15dc37b33e32d5adf7ae1e790b435b71f1d51ea48

See more details on using hashes here.

File details

Details for the file django_db_modeler-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for django_db_modeler-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7bfb998a1118bf255c7afa4c1695d34edc733295d8fdffba438377245ee8746
MD5 a97063d85781b264596b3f1e0b82614d
BLAKE2b-256 6c6ba707d654e3d957018cadfdf142241e32402e2647c45f43a55da79d693cfb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page