mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-31 15:28:08 +08:00
23 lines
796 B
Python
23 lines
796 B
Python
|
from config.settings import MEDIA_ROOT
|
||
|
from django.conf.urls.static import static
|
||
|
from django.contrib import admin
|
||
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||
|
from django.urls import include, path
|
||
|
from drf_spectacular.views import (
|
||
|
SpectacularAPIView,
|
||
|
SpectacularRedocView,
|
||
|
SpectacularSwaggerView,
|
||
|
)
|
||
|
|
||
|
urlpatterns = [
|
||
|
path("accounts/", include("accounts.urls")),
|
||
|
path("admin/", admin.site.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"),
|
||
|
]
|
||
|
urlpatterns += staticfiles_urlpatterns()
|
||
|
urlpatterns += static("media/", document_root=MEDIA_ROOT)
|