django-schema-viewer
Visualizes a DB schema based on Django models.
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