DRF_Template/backend/api/urls.py

15 lines
404 B
Python
Raw Normal View History

2024-01-06 12:27:41 +08:00
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
2024-01-06 12:13:39 +08:00
from django.urls import path, include
from config import settings
urlpatterns = [
path('accounts/', include('accounts.urls')),
]
2024-01-06 12:27:41 +08:00
# Media files
if settings.DEBUG:
2024-01-06 12:13:39 +08:00
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(
2024-01-06 12:27:41 +08:00
'media/', document_root=settings.MEDIA_ROOT)