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("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)