3👍
✅
When you are running django under DEBUG = True
, you should also add media urls:
Add this to end of your main urls.py
:
from django.conf import settings
from django.conf.urls.static import static
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# and this one to serve static files:
#urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Source:stackexchange.com