mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-19 01:23:02 +08:00
25 lines
966 B
Python
25 lines
966 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("documents/", include("documents.urls")),
|
|
path("requests/", include("document_requests.urls")),
|
|
path("questionnaires/", include("questionnaires.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)
|