Answer the question
In order to leave comments, you need to log in
Images in django in production?
Everything stopped when I set
Debug = False The
static works fine after collectstatic
in the browser.
Settings.py<img src="/media/media/1.jpg">
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')
CKEDITOR_UPLOAD_PATH = "media/"
CKEDITOR_IMAGE_BACKEND = "pillow"
Answer the question
In order to leave comments, you need to log in
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
Django probably has nothing to do with it. See the server config that you have on top of Django.
Write STATIC_ROOT and MEDIA_ROOT in the settings with the full path, i.e. /home/pandaphpgun/tgv/static.
And the path to / media is not registered in the web server configuration
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question