Skip to main content

Django app to render ER diagram

Project description

Django-db-schema-renderer

Overview

This is a django app to render db schema (ER diagram), of selected models or apps inside django admin panel

Requirements

  • Python 3.7+
  • Django 3.1+
  • django-extensions 3+
  • pygraphviz 1.7+

For successful install of pygraphviz you need to have on your host graphviz installed. you can find official docs here On apple silicon this can be achieved by running command:

brew install graphviz
pip3 install \
    --global-option=build_ext \
    --global-option="-I$(brew --prefix graphviz)/include/" \
    --global-option="-L$(brew --prefix graphviz)/lib/" \
    pygraphviz

Installation

  1. Install using pip...

    pip install django-db-schema-renderer

  2. Add django_db_schema_renderer to your INSTALLED_APPS setting, before django.contrib.admin(make sure you have django-extensions also added)

    INSTALLED_APPS = [
        'django_db_schema_renderer',
        'django.contrib.admin',
        ...
        'django-extensions'
    
    ]
    
  3. Edit the {project_dir}/urls.py module in your project:

    from django_db_schema_renderer.urls import schema_urls
    
    urlpatterns = [
    ...
     path("db-schema/", include((schema_urls, "db-schema"))),
    ...
    ]
    

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_schema_renderer-0.1.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

django_db_schema_renderer-0.1.2-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

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