Skip to content

Commit

Permalink
Update urls.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriqueCCdA authored Feb 29, 2024
1 parent 804d7e6 commit 4a1beab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jornada_milhas/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from django.urls import include, path
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView

urlpatterns = [path("admin/", admin.site.urls), path("", include("jornada_milhas.core.urls"))]
urlpatterns = [
path("admin/", admin.site.urls),
path("", include("jornada_milhas.core.urls"))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DOC_API:
urlpatterns += [
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
path("docs/", SpectacularSwaggerView.as_view(url_name="schema"), name="docs"),
path("redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
]

if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 comments on commit 4a1beab

Please sign in to comment.