from django.contrib import admin from django.urls import path, include from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView from config.settings import DEBUG urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/', include('api.urls')), path('schema/', SpectacularAPIView.as_view(), name='schema'), path('swagger/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), path('redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'), ] if DEBUG: urlpatterns += [path('silk/', include('silk.urls', namespace='silk'))]