mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 05:29:37 +08:00
20 lines
772 B
Python
20 lines
772 B
Python
from django.contrib import admin
|
|
from django.urls import include, path
|
|
from drf_spectacular.views import (SpectacularAPIView, SpectacularRedocView,
|
|
SpectacularSwaggerView)
|
|
|
|
from core.settings import config
|
|
|
|
urlpatterns = [
|
|
path("accounts/", include("accounts.urls")),
|
|
# Admin Panel
|
|
path("admin/", admin.site.urls),
|
|
# Swagger and Redoc API Doc 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"),
|
|
# Silk Enabled on DEBUG
|
|
*([path("silk/", include("silk.urls", namespace="silk"))] if config.DEBUG else []),
|
|
]
|