mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-04-27 18:21:23 +08:00
Initial commit
This commit is contained in:
commit
ccd7c5873c
22 changed files with 921 additions and 0 deletions
0
docmanager_backend/api/__init__.py
Normal file
0
docmanager_backend/api/__init__.py
Normal file
22
docmanager_backend/api/urls.py
Normal file
22
docmanager_backend/api/urls.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
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)
|
Loading…
Add table
Add a link
Reference in a new issue