As stated in topic, my Django site media url is returning 404 after trying to access it. Everything was working flawless until I wanted to end the development process and set
DEBUG = True
in settings.py to have the site finished once and for all. When I change DEBUG back to
DEBUG = False
it works fine once again. I have no idea what's the problem, any suggestions?
This is by design: https://docs.djangoproject.com/en/1.7/howto/static-files/#serving-static-files-during-development
That being said, you can use the following workaround by modifying your
urls.py
:Note that this is highly inefficient and not encouraged for production use. You should normally configure your web server (apache, nginx, etc) to serve your static and media content.