Skip to content

Commit

Permalink
Change urls.py urlpatterns for static files
Browse files Browse the repository at this point in the history
  • Loading branch information
FredMagas committed Aug 9, 2024
1 parent 8001445 commit 0d37029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion portfolioweb/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@
path('', include('fredmagaweb.urls')),
]

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

0 comments on commit 0d37029

Please sign in to comment.