Redirect API root to swagger docs
This commit is contained in:
parent
fc141c9778
commit
8dea738893
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
from django.urls import include, path, re_path
|
||||
from django.views.generic import RedirectView
|
||||
from drf_yasg import openapi
|
||||
from drf_yasg.views import get_schema_view
|
||||
from rest_framework import permissions
|
||||
|
@ -37,4 +38,5 @@ urlpatterns = [
|
|||
re_path(
|
||||
r"^redoc/$", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"
|
||||
),
|
||||
path("", RedirectView.as_view(pattern_name="api:schema-swagger-ui")),
|
||||
] + api_urlpatterns
|
||||
|
|
Loading…
Reference in a new issue