Reputation: 527
In my settings file there is STATIC_URL = '/static/'
and getting access to static files(css files) from the directory app/static/css/filename
. If I add this to the setting file
MEDIA_URL = '/media/'
is it possible to access the media files from app/media/filename
? There is no MEDIA_ROOT
or STATIC_ROOT
in my settings.py.
Upvotes: 0
Views: 1241
Reputation: 308849
The MEDIA_URL
is meant for files uploaded by a user. These files are not checked in, so you shouldn't have a media
directory inside your app.
For media files to work, you must set MEDIA_ROOT
in your settings. See the docs for instructions how to serve media files.
Upvotes: 4