Skip to content

Commit 7dc4dd1

Browse files
committed
Replace old doc page with redoc
1 parent 1d175d7 commit 7dc4dd1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

main/urls.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373

7474
# DRF routes
7575
from rest_framework import routers
76-
from rest_framework.documentation import include_docs_urls
77-
from rest_framework import permissions
7876
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
7977
from api import drf_views as api_views
8078
from flash_update import views as flash_views
@@ -240,11 +238,9 @@
240238
url(r"^exception-error-for-devs", DummyExceptionError.as_view()),
241239
path("i18n/", include("django.conf.urls.i18n")),
242240
# Docs
243-
url(r"^docs/", include_docs_urls(title="IFRC GO API", public=False)), # TODO: Remove this?
241+
path("docs/", SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
244242
path("api-docs/", SpectacularAPIView.as_view(), name='schema'),
245243
path("api-docs/swagger-ui/", SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
246-
path("api-docs/redoc/", SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
247-
248244
]
249245

250246
if settings.DEBUG:
@@ -255,9 +251,7 @@
255251
url("__debug__/", include(debug_toolbar.urls)),
256252
# For django versions before 2.0:
257253
# url(r'^__debug__/', include(debug_toolbar.urls)),
258-
]
259-
+ urlpatterns
260-
+ static.static(
254+
] + urlpatterns + static.static(
261255
settings.MEDIA_URL,
262256
view=xframe_options_exempt(serve),
263257
document_root=settings.MEDIA_ROOT,

0 commit comments

Comments
 (0)