Home:ALL Converter>Django shows 404 error on media files when debug = False in production

Django shows 404 error on media files when debug = False in production

Ask Time:2017-12-23T07:51:09         Author:gathagu

Json Formatter

I'm trying to put a django website live and after going through the deployment checklist and turning debug = False django gives out a 404 error and only static files are loaded no media files uploaded from users are displayed. However with debug=True all the images and files work properly. below are the configurations of the project with debug = True. The console logs show multiple missing files.can someone point to me what i'm doing wrong?

settings.py enter image description here

urls.py enter image description here

console errors enter image description here

Author:gathagu,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/47948586/django-shows-404-error-on-media-files-when-debug-false-in-production
yy