# django-schema-viewer
[![GitHub Actions](https://github.com/pikhovkin/django-schema-viewer/actions/workflows/tests.yaml/badge.svg)](https://github.com/pikhovkin/django-schema-viewer/actions)
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/pikhovkin/dc6f561d32b4e4e6d6f05bfd59c4ffaf/raw/covbadge.json)
[![PyPI - Version](https://img.shields.io/pypi/v/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)
[![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)
[![PyPI - License](https://img.shields.io/pypi/l/django-schema-viewer.svg)](./LICENSE)
[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
Visualizes a DB schema based on Django models.
[![django-schema-viewer demo](docs/screenview.png "Click to see demo")](https://django-schema-viewer.up.railway.app/schema-viewer/)
### Installation
```console
pip install django-schema-viewer
```
### Usage
1. Install the package
2. Add `schema_viewer` to your `INSTALLED_APPS` settings like this:
```python
INSTALLED_APPS = [
...,
'schema_viewer',
...,
]
```
3. Add `schema_viewer.urls` to main `urls.py`:
```python
from django.urls import path, include
urlpatterns = [
...,
path('schema-viewer/', include('schema_viewer.urls')),
...,
]
```
4. Run the project
```console
python manange.py runserver
```
5. Go to http://127.0.0.1:8000/schema-viewer/
### Optional settings
```python
SCHEMA_VIEWER = {
'apps': [
'contenttypes',
'my_app',
],
'exclude': {
'auth': ['User'],
'my_app': ['SomeModel'],
},
}
```
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "django-schema-viewer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "database-gui,database-schema,django,django-models,entity-relationship-diagram,er-diagram,erd,json-table-schema,schema,schema-diagram,schema-graph,schema-viewer,viewer",
"author": null,
"author_email": "Sergei Pikhovkin <s@pikhovkin.ru>",
"download_url": "https://files.pythonhosted.org/packages/b5/b2/902cc8671673b2860325ea590c5a4bcf8454b7ea3d90e913bf58f4ddc818/django_schema_viewer-0.4.1.tar.gz",
"platform": null,
"description": "# django-schema-viewer\n\n[![GitHub Actions](https://github.com/pikhovkin/django-schema-viewer/actions/workflows/tests.yaml/badge.svg)](https://github.com/pikhovkin/django-schema-viewer/actions)\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/pikhovkin/dc6f561d32b4e4e6d6f05bfd59c4ffaf/raw/covbadge.json)\n[![PyPI - Version](https://img.shields.io/pypi/v/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)\n[![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-schema-viewer.svg)](https://pypi.org/project/django-schema-viewer)\n[![PyPI - License](https://img.shields.io/pypi/l/django-schema-viewer.svg)](./LICENSE)\n\n[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)\n[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nVisualizes a DB schema based on Django models.\n\n[![django-schema-viewer demo](docs/screenview.png \"Click to see demo\")](https://django-schema-viewer.up.railway.app/schema-viewer/)\n\n### Installation\n\n```console\npip install django-schema-viewer\n```\n\n### Usage\n\n1. Install the package\n\n2. Add `schema_viewer` to your `INSTALLED_APPS` settings like this:\n\n```python\nINSTALLED_APPS = [\n ...,\n 'schema_viewer',\n ...,\n]\n```\n\n3. Add `schema_viewer.urls` to main `urls.py`:\n\n```python\nfrom django.urls import path, include\n\nurlpatterns = [\n ...,\n path('schema-viewer/', include('schema_viewer.urls')),\n ...,\n]\n```\n\n4. Run the project\n\n```console\npython manange.py runserver\n```\n\n5. Go to http://127.0.0.1:8000/schema-viewer/\n\n### Optional settings\n\n```python\nSCHEMA_VIEWER = {\n 'apps': [\n 'contenttypes',\n 'my_app',\n ],\n 'exclude': {\n 'auth': ['User'],\n 'my_app': ['SomeModel'],\n },\n}\n```\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.4.1",
"project_urls": {
"Documentation": "https://github.com/pikhovkin/django-schema-viewer#readme",
"Issues": "https://github.com/pikhovkin/django-schema-viewer/issues",
"Source": "https://github.com/pikhovkin/django-schema-viewer"
},
"split_keywords": [
"database-gui",
"database-schema",
"django",
"django-models",
"entity-relationship-diagram",
"er-diagram",
"erd",
"json-table-schema",
"schema",
"schema-diagram",
"schema-graph",
"schema-viewer",
"viewer"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "66a377a57618fe3a3c6f208b6c8ce612f9b484a0faab55719bd4f3bbf4206fb7",
"md5": "f30a47bbe471160579d97f0282244ff2",
"sha256": "a111c8e6aae4c6b154122580e1cea8c9ae3ac5399a81e5c4a57f534151d24cca"
},
"downloads": -1,
"filename": "django_schema_viewer-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f30a47bbe471160579d97f0282244ff2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 492135,
"upload_time": "2023-12-22T18:34:57",
"upload_time_iso_8601": "2023-12-22T18:34:57.495532Z",
"url": "https://files.pythonhosted.org/packages/66/a3/77a57618fe3a3c6f208b6c8ce612f9b484a0faab55719bd4f3bbf4206fb7/django_schema_viewer-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b5b2902cc8671673b2860325ea590c5a4bcf8454b7ea3d90e913bf58f4ddc818",
"md5": "b199f6ee97a728e5344610b4d57a0e42",
"sha256": "824b81f443d7d8e8ae39bfd3dd412b8337807701dab3a94bc46248728b14a521"
},
"downloads": -1,
"filename": "django_schema_viewer-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "b199f6ee97a728e5344610b4d57a0e42",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 485662,
"upload_time": "2023-12-22T18:34:59",
"upload_time_iso_8601": "2023-12-22T18:34:59.388948Z",
"url": "https://files.pythonhosted.org/packages/b5/b2/902cc8671673b2860325ea590c5a4bcf8454b7ea3d90e913bf58f4ddc818/django_schema_viewer-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-22 18:34:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pikhovkin",
"github_project": "django-schema-viewer#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-schema-viewer"
}