django-schema-graph


Namedjango-schema-graph JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/meshy/django-schema-graph
SummaryAn interactive graph of your Django model structure.
upload_time2023-05-14 23:15:09
maintainer
docs_urlNone
authorCharlie Denton
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django Schema Graph

Django-schema-graph makes a colourful diagram out of your Django models. The
diagram is interactive, and makes it easy to toggle models and apps on/off at
will.

It looks like this:

| Feature       | Screenshot |
| ---           | --- |
| Models        | ![models screenshot](docs-images/models.png) |
| Apps          | ![apps screenshot](docs-images/apps.png) |
| Both together | ![models and apps screenshot](docs-images/combination.png) |
| Graph editor  | ![menu screenshot](docs-images/menu.png) |

(Apologies that the images above don't work on PyPI. [Check it out on
GitHub](https://github.com/meshy/django-schema-graph/blob/master/README.md).)


## Installation

Install from PyPI:

```bash
pip install django-schema-graph
```

Add to `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    ...
    'schema_graph',
    ...
]
```

Add to your URLs.

```python
from schema_graph.views import Schema
urlpatterns += [
    # On Django 2+:
    path("schema/", Schema.as_view()),
    # Or, on Django < 2:
    url(r"^schema/$", Schema.as_view()),
]
```

## Use

Browse to `/schema/` (assuming that's where you put it in your URLs).

You can control access to this page using the `SCHEMA_GRAPH_VISIBLE` setting,
or by subclassing `schema_graph.views.Schema` and overriding `access_permitted`.
By default the page is only visible when `DEBUG` is `True`,
because we assume that you don't want to leak sensitive information about your
website outside of local development.

## Support

Tests run on sensible combinations of:
- Python (3.10-3.11)
- Django (3.2-4.1)

If you're stuck on old version of Python or Django, you may consider installing
old versions.
They will probably have fewer features, and there will be no support for them.

The last version to support Python 2.7 and 3.5 was 1.2.0.
The last version to support Python 3.6 to 3.9 was 2.2.1.

The last version to support Django 1.8 was 1.2.0.
The last version to support Django 1.9 to 3.1 was 2.2.1.

## Alternatives

- [`django-spaghetti-and-meatballs`](https://github.com/LegoStormtroopr/django-spaghetti-and-meatballs)
  is great. At the time of writing, it offers a lot more detailed information
  on the models in the diagram, but doesn't allow them to be turned on/off in
  the page.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/meshy/django-schema-graph",
    "name": "django-schema-graph",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "Charlie Denton",
    "author_email": "charlie@meshy.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/b1/d5/07fa056788e1a9dc398e10f389b971b99fa4a653c7780bf83640fceecc30/django_schema_graph-3.1.0.tar.gz",
    "platform": null,
    "description": "# Django Schema Graph\n\nDjango-schema-graph makes a colourful diagram out of your Django models. The\ndiagram is interactive, and makes it easy to toggle models and apps on/off at\nwill.\n\nIt looks like this:\n\n| Feature       | Screenshot |\n| ---           | --- |\n| Models        | ![models screenshot](docs-images/models.png) |\n| Apps          | ![apps screenshot](docs-images/apps.png) |\n| Both together | ![models and apps screenshot](docs-images/combination.png) |\n| Graph editor  | ![menu screenshot](docs-images/menu.png) |\n\n(Apologies that the images above don't work on PyPI. [Check it out on\nGitHub](https://github.com/meshy/django-schema-graph/blob/master/README.md).)\n\n\n## Installation\n\nInstall from PyPI:\n\n```bash\npip install django-schema-graph\n```\n\nAdd to `INSTALLED_APPS`:\n\n```python\nINSTALLED_APPS = [\n    ...\n    'schema_graph',\n    ...\n]\n```\n\nAdd to your URLs.\n\n```python\nfrom schema_graph.views import Schema\nurlpatterns += [\n    # On Django 2+:\n    path(\"schema/\", Schema.as_view()),\n    # Or, on Django < 2:\n    url(r\"^schema/$\", Schema.as_view()),\n]\n```\n\n## Use\n\nBrowse to `/schema/` (assuming that's where you put it in your URLs).\n\nYou can control access to this page using the `SCHEMA_GRAPH_VISIBLE` setting,\nor by subclassing `schema_graph.views.Schema` and overriding `access_permitted`.\nBy default the page is only visible when `DEBUG` is `True`,\nbecause we assume that you don't want to leak sensitive information about your\nwebsite outside of local development.\n\n## Support\n\nTests run on sensible combinations of:\n- Python (3.10-3.11)\n- Django (3.2-4.1)\n\nIf you're stuck on old version of Python or Django, you may consider installing\nold versions.\nThey will probably have fewer features, and there will be no support for them.\n\nThe last version to support Python 2.7 and 3.5 was 1.2.0.\nThe last version to support Python 3.6 to 3.9 was 2.2.1.\n\nThe last version to support Django 1.8 was 1.2.0.\nThe last version to support Django 1.9 to 3.1 was 2.2.1.\n\n## Alternatives\n\n- [`django-spaghetti-and-meatballs`](https://github.com/LegoStormtroopr/django-spaghetti-and-meatballs)\n  is great. At the time of writing, it offers a lot more detailed information\n  on the models in the diagram, but doesn't allow them to be turned on/off in\n  the page.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An interactive graph of your Django model structure.",
    "version": "3.1.0",
    "project_urls": {
        "Homepage": "https://github.com/meshy/django-schema-graph",
        "Repository": "https://github.com/meshy/django-schema-graph"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e33bdf3825ad4693b69fa7fa95d654e4672992029d5d698813f3e80cc6c38da7",
                "md5": "9242ec7cd03d4e859816a22e0d011550",
                "sha256": "b240e308414018409e1588ca65a0b104f19b3829303e39071e9aa85b86317d3d"
            },
            "downloads": -1,
            "filename": "django_schema_graph-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9242ec7cd03d4e859816a22e0d011550",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 324390,
            "upload_time": "2023-05-14T23:15:07",
            "upload_time_iso_8601": "2023-05-14T23:15:07.480877Z",
            "url": "https://files.pythonhosted.org/packages/e3/3b/df3825ad4693b69fa7fa95d654e4672992029d5d698813f3e80cc6c38da7/django_schema_graph-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1d507fa056788e1a9dc398e10f389b971b99fa4a653c7780bf83640fceecc30",
                "md5": "1cd7f332534e66affcd75b96be043a09",
                "sha256": "d8ef410ccd0db0fce5942a35beaa6badbca76ddce3430d9c58ac1549ad4390ab"
            },
            "downloads": -1,
            "filename": "django_schema_graph-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1cd7f332534e66affcd75b96be043a09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 323113,
            "upload_time": "2023-05-14T23:15:09",
            "upload_time_iso_8601": "2023-05-14T23:15:09.292839Z",
            "url": "https://files.pythonhosted.org/packages/b1/d5/07fa056788e1a9dc398e10f389b971b99fa4a653c7780bf83640fceecc30/django_schema_graph-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-14 23:15:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "meshy",
    "github_project": "django-schema-graph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-schema-graph"
}
        
Elapsed time: 0.07954s