DRF_Template/backend/api/urls.py
2024-01-06 12:13:39 +08:00

14 lines
426 B
Python

from django.urls import path, include
from config import settings
urlpatterns = [
path('accounts/', include('accounts.urls')),
]
if settings.DEBUG:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
# Media files
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(
settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)