Skip to content

Commit 6ef5fc1

Browse files
committed
add settings for staticfiles in urls
1 parent ce2a4be commit 6ef5fc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: TaskManager/TaskManager/urls.py

+8
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@
1616
"""
1717
from django.contrib import admin
1818
from django.urls import path, include
19+
from django.conf.urls.static import static
20+
from django.conf import settings
1921

2022
urlpatterns = [
2123
path('admin/', admin.site.urls),
2224
path('authSystem/',include('authSystem.urls')),
2325
path('tasks/',include('tasks.urls'))
2426
]
27+
28+
if settings.DEBUG:
29+
urlpatterns += static(
30+
settings.MEDIA_URL,
31+
document_root=settings.MEDIA_ROOT,
32+
)

0 commit comments

Comments
 (0)