Answer the question
In order to leave comments, you need to log in
Images not working on django production - how to fix?
When I turn on debug true - everything works fine, but that's when it's false. Django can't find images.
I changed the permissions on the folder with the media to 755 then to 777, because in the admin panel it was impossible to add an image to the server because there were not enough rights.
upd. Now 1 out of 3 is working. But why ? urls are the same everywhere.
STATIC_URL = '/static/'
DEBUG = True
ALLOWED_HOSTS = []
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')
CKEDITOR_UPLOAD_PATH = "media/"
CKEDITOR_IMAGE_BACKEND = "pillow"
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question