2024-01-06 12:13:39 +08:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import path, include
|
|
|
|
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
|
2024-05-10 23:15:29 +08:00
|
|
|
from config.settings import DEBUG
|
2024-01-06 12:13:39 +08:00
|
|
|
|
|
|
|
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'),
|
|
|
|
]
|
2024-05-10 23:15:29 +08:00
|
|
|
|
|
|
|
if DEBUG:
|
|
|
|
urlpatterns += [path('silk/', include('silk.urls', namespace='silk'))]
|