Configure URL routing for media files
mainTo serve user-uploaded files during development, ensure your urls.py includes the static helper for MEDIA_URL and MEDIA_ROOT.
Note: This is for development (DEBUG = True) only. In production, configure your web server (e.g., Nginx) to serve files from MEDIA_ROOT directly.
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = (
# ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)