DjangoVista
A local, open-source Django model explorer. DjangoVista reads Python source with AST, builds an interactive model diagram and refreshes it when source files change. Diagram scanning does not import your Django project, run its code or connect to a database. The optional migration check runs Django explicitly.
Status: 0.1.0 alpha. PyPI and editor marketplace releases are not published yet.
The distribution and CLI are named django-vista; the Python import is django_vista.
Source: Jamshid057/Django-Vista. Report bugs through GitHub Issues.
Features
- Module-qualified model identities, import aliases and split model packages.
- Fields, primary/composite keys, nullability and uniqueness.
- ForeignKey, OneToOneField, ManyToManyField and explicit through models.
- Abstract/proxy models and concrete inheritance parent links.
- Partial graphs with actionable syntax and unresolved-reference diagnostics.
- Model cards, automatic ELK layout, search, app filtering, minimap and zoom.
- Debounced live snapshots over WebSocket, reconnect and preserved node positions.
- Python library, JSON export CLI and a local server with bundled release UI.
Install from source
Python 3.12+ and Node 24+ are needed for building from source. Released wheels include the UI and will not require Node.
git clone https://github.com/Jamshid057/Django-Vista.git
cd Django-Vista
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python scripts/build_release.py --bundle-only
python -m pip install .
django-vista serve /absolute/path/to/django-project
On Windows activate .venv\Scripts\activate instead. The server binds to
127.0.0.1:8000; use --port 8001 to choose another port or --no-browser to avoid
opening a browser. The project path is local to the computer running the backend.
django-vista graph /path/to/project --output graph.json
Library use:
from pathlib import Path
from django_vista import build_graph
graph = build_graph(Path("/path/to/project"))
print(graph.model_dump_json(indent=2))
Open from manage.py
Install DjangoVista into your Django project's virtual environment:
python -m pip install /absolute/path/to/django-vista
Add "django_vista" to your project's INSTALLED_APPS:
INSTALLED_APPS = [
# Your existing apps ...
"django_vista",
]
Then launch from the project terminal:
python manage.py showmodels
python manage.py showmodels --port 8001
python manage.py showmodels --no-browser
The command opens the diagram in your browser and serves it until Ctrl+C.
It uses the directory containing manage.py, falling back to BASE_DIR for
programmatic invocation. Use --project /path/to/project to override it.
Django loads your installed apps when invoking management commands; the diagram
scanner itself remains static. Command startup does not run migration checks.
Development
Install the Python package in editable mode at the repository root:
python -m pip install -e .
python -m uvicorn django_vista.main:app --reload
In a second terminal:
cd frontend
npm ci
npm run dev
Open http://localhost:5173 and enter the Django project directory. You can use the
absolute path to examples/sample_project for a source-only demonstration. Those
fixtures do not need Django installed and are not a runnable Django application.
The Vite UI uses http://127.0.0.1:8000 by default; frontend/.env.example documents
VITE_API_URL. Bundled UI connects to its own server origin. Standard local Vite
origins are allowed for HTTP and WebSocket; production remote hosting is outside
this release's scope.
Checks
PYTHONPATH=backend python -m unittest discover -s backend/tests -v
cd frontend
npm run build
npm run lint
npm run test
Backend tests cover parser behavior and in-process HTTP/WebSocket/watcher lifecycle. See validation results, graph contract and implementation plan.
Build a release
python -m pip install build
python scripts/build_release.py
python -m pip install dist/django_vista-0.1.0-py3-none-any.whl
The build script compiles the frontend, copies it into the Python package and
builds a wheel and source archive. Generated UI/build output is ignored by Git.
Use --skip-install when frontend dependencies are already installed.
Publishing to PyPI is a separate release action. No package or extension has been published by this implementation.
Static analysis limitations
Static analysis cannot reproduce arbitrary Django runtime behavior. Conditional
model definitions, dynamically generated fields, custom field behavior, wildcard
imports and model classes supplied only by unscanned dependencies are unsupported.
Known unresolved fields, relationships and bases produce diagnostics; no target is
guessed. Implicit IDs use a placeholder AutoField because project
DEFAULT_AUTO_FIELD is not evaluated. Abstract nodes are displayed for context;
concrete inherited storage is represented through parent links.
Live updates use filtered filesystem polling (1 second) and debounce (0.2 seconds), rescan the project and send full snapshots. Incremental parsing should follow measured need. Source scanning excludes environments, migrations, caches, build directories and symlinks.
Open-source and editor integrations
The Python library and local API are the reusable core. VS Code and PyCharm
extensions can later start django-vista serve --no-browser, display the diagram in
an editor panel and reuse the same graph protocol. See the
distribution roadmap. Editor extensions are not implemented
in this alpha.
Contributions are welcome; see CONTRIBUTING.md. Licensed under MIT.
Diagram editing and migration status
Double-click a model to open the field editor. Add standard scalar fields or edit
null, blank, unique, and length/decimal parameters of declared fields.
Preview shows a unified source diff; Apply writes the model file. A file revision
check rejects stale previews. Existing methods, comments, imports, and unrelated
field arguments are preserved. Field renaming, deletion, type changes, relationship
editing, and model creation are not implemented yet.
Open Migration status in the sidebar and click Check migrations. This is an
explicit runtime feature: it runs the project's Django code and reads migration
history from the default database. Enter the project's absolute Python interpreter
path, or let DjangoVista detect .venv/venv; it falls back to the server Python.
The opened directory must contain manage.py.
The panel shows makemigrations --dry-run --verbosity 3 output, checks for missing
migration files, and lists applied/pending migrations with showmigrations --plan.
It does not create migration files or apply migrations. Run the displayed
makemigrations and migrate commands in the project console, then check again.
Checks are manual; source updates mark the last result stale. Database errors are
shown as errors rather than an up-to-date status. Checks have a per-command timeout.
Repository and package naming
| Surface | Name |
|---|---|
| Project | DjangoVista |
| Python distribution / repository | django-vista |
| Terminal command | django-vista |
| Python import / Django installed app | django_vista |
The source directory remains backend/app/; setuptools maps it to django_vista
when installed. Use django_vista in Python code, not the hyphenated package name.
See contributing for development checks and Git setup for connecting this source tree to a remote.
Metadata
Release files for django-vista 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_vista-0.1.0.tar.gz | 663.4 kB | Without provenance | Details for django_vista-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_vista-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for django_vista-0.1.0-py3-none-any.whl |
Total release size: 1.3 MB
Release files / django_vista-0.1.0.tar.gz
| Download URL | django_vista-0.1.0.tar.gz |
|---|---|
| Size | 663.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f692daf71f21b03dd2bb188ab6e3417cd5b5291bb04c72d49ad0e460f088ac16
|
|
BLAKE2b-256 checksum How to use checksums |
90b6d1c9f4fdbaeab13d2856ee0893927f8be6e57f3ded305b001c0cbb613e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / django_vista-0.1.0-py3-none-any.whl
| Download URL | django_vista-0.1.0-py3-none-any.whl |
|---|---|
| Size | 609.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca05bbfe5485ee57b5b6f8f4bdb26600393727edec7c61f216f3bf83a93d2bf6
|
|
BLAKE2b-256 checksum How to use checksums |
1616734588aaacd84a5eb937f1c99cd6f58e57e60d86ddbc670d91b9ec6a0d0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for django-vista 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.