|
73 | 73 |
|
74 | 74 | # DRF routes |
75 | 75 | from rest_framework import routers |
76 | | -from rest_framework.documentation import include_docs_urls |
77 | | -from rest_framework import permissions |
78 | 76 | from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView |
79 | 77 | from api import drf_views as api_views |
80 | 78 | from flash_update import views as flash_views |
|
240 | 238 | url(r"^exception-error-for-devs", DummyExceptionError.as_view()), |
241 | 239 | path("i18n/", include("django.conf.urls.i18n")), |
242 | 240 | # 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'), |
244 | 242 | path("api-docs/", SpectacularAPIView.as_view(), name='schema'), |
245 | 243 | 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 | | - |
248 | 244 | ] |
249 | 245 |
|
250 | 246 | if settings.DEBUG: |
|
255 | 251 | url("__debug__/", include(debug_toolbar.urls)), |
256 | 252 | # For django versions before 2.0: |
257 | 253 | # url(r'^__debug__/', include(debug_toolbar.urls)), |
258 | | - ] |
259 | | - + urlpatterns |
260 | | - + static.static( |
| 254 | + ] + urlpatterns + static.static( |
261 | 255 | settings.MEDIA_URL, |
262 | 256 | view=xframe_options_exempt(serve), |
263 | 257 | document_root=settings.MEDIA_ROOT, |
|
0 commit comments