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)