Forums

No images from media when debug=False - MEDIA and STATIC are set!

Hi, I have my Django app deployed and running and I have The static & media variables set in the settings.py Also the static in web tab is set correctly but when I change Debug to False the images under media never show up even Though the css and js files under the static folder are loaded Correctly, here is the settings I have:

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
STATIC_DIR = os.path.join(BASE_DIR, 'static')
MEDIA_DIR = os.path.join(BASE_DIR, 'media')

and also:

STATIC_URL = '/static/'
STATICFILES_DIRS = [
    STATIC_DIR,
]

MEDIA_ROOT = MEDIA_DIR
MEDIA_URL = '/media/'

What am I missing here? Please help ... Thanks

OK, I found out that at the WEB tab I did set the static bath but not the media path I added that and everything is working fine now

great!

i have faced same problem & solved now

i have facing same problem but till not solved Changes are done but problem not solved

Glad to hear that you solved it.