django-schema-viewer
![PyPI - License](https://img.shields.io/pypi/l/django-schema-viewer.svg)
![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
![Liberapay](https://img.shields.io/badge/Liberapay-F6C915?logo=liberapay&logoColor=black)
Visualizes a DB schema based on Django models.
![Click to see demo django-schema-viewer demo](https://github.com/pikhovkin/django-schema-viewer/raw/HEAD/docs/screenview.png)
Installation
pip install django-schema-viewer
Usage
-
Install the package
-
Add schema_viewer
to your INSTALLED_APPS
settings like this:
INSTALLED_APPS = [
...,
'schema_viewer',
...,
]
- Add
schema_viewer.urls
to main urls.py
:
from django.urls import path, include
urlpatterns = [
...,
path('schema-viewer/', include('schema_viewer.urls')),
...,
]
- Run the project
python manange.py runserver
- Go to http://127.0.0.1:8000/schema-viewer/
Optional settings
SCHEMA_VIEWER = {
'apps': [
'contenttypes',
'my_app',
],
'exclude': {
'auth': ['User'],
'my_app': ['SomeModel'],
},
}
License
MIT