I have a django app running on cpanel (I'm not sure if is a problem of my
django app or cpanel server), when the debug mode is set up True. I can see all the media files, like profiles pictures or pdf files, etc. But when the debug mode is set up False, you can't see the media files on the app. This is my configuratios on the settings.py file.
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
STATIC_URL = '/static/'
STATIC_ROOT = '<app-directory>/public_html/static'
# Media files
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
# Crispy Form Theme - Bootstrap 3
CRISPY_TEMPLATE_PACK = 'bootstrap3'
# For Bootstrap 3, change error alert to 'danger'
from django.contrib import messages
MESSAGE_TAGS = {
messages.ERROR: 'danger'
}