File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 66# Import TemplateView for rendering templates
77from django .views .generic import TemplateView
88import importlib # Import the importlib module for dynamic module importing
9+ from drf_spectacular .views import SpectacularAPIView , SpectacularSwaggerView , SpectacularRedocView
10+
11+
912
1013# Define a list of URL patterns for the application
1114# Keep admin outside /api/ prefix
5053# Wrap all API routes under /api/ prefix
5154urlpatterns += [
5255 path ("api/" , include (api_urlpatterns )),
56+ path ("api/schema/" , SpectacularAPIView .as_view (), name = "schema" ),
57+ path ("api/docs/" , SpectacularSwaggerView .as_view (url_name = "schema" ), name = "swagger-ui" ),
58+ path ("api/redoc/" , SpectacularRedocView .as_view (url_name = "schema" ), name = "redoc" ),
5359]
5460
5561import os
You can’t perform that action at this time.
0 commit comments