I know this has been asked before, but I\'m having a hard time setting up JS on my Django web app, even though I\'m reading the documentation.
I\'m running the Django de
The error 404 occurs because MEDIA_ROOT
requires absolute path, not relative. The server is trying to access /media
in your filesystem, which is obviously not what you want.
Try this instead:
import os
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'site_media')
MEDIA_URL = '/media/'