django-schema-graph icon indicating copy to clipboard operation
django-schema-graph copied to clipboard

Add URLs module

Open paduszyk opened this issue 11 months ago • 0 comments

The plugin is great! Thanks for creating and maintaining it 👍🏻

If schema_graph.urls module with:

# schema_graph/urls.py

from .views import Schema

urlpatterns = [
    path("", view=Schema.as_view()),
]

is present in the codebase, then installation of the plugin's functionality is much easier:

# Django project's URLconf

from django.urls import include, path

urlpatterns = [
    path('schema-graph/', include("schema_graph.urls"),
]

Of course, this is only a proposal, just one way of switching the plugin on. However, the approach is rather a standard, as applied by other leading plugins, e.g. DDT. The key benefit is that one does not have to import schema_graph directly.

If you find it interesting I can open the PR.

paduszyk avatar Jan 03 '25 10:01 paduszyk