Answer the question
In order to leave comments, you need to log in
How to make the correct path to the folder with the image?
Folder for uploaded images:
E:\django\kuluars\media\uploads
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_URL = '/media/uploads/'
MEDIA_ROOT = os.path.join(BASE_DIR, "media/uploads")
CKEDITOR_FILENAME_GENERATOR = 'utils.get_filename'
CKEDITOR_UPLOAD_PATH = MEDIA_ROOT
CKEDITOR_IMAGE_BACKEND = 'pillow'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, os.path.join(BASE_DIR, "dev_static")),
]
def get_filename(filename):
return filename.upper()
127.0.0.1:8000/media/uploads/E%3A/django/kuluars/media/uploads/IMGP1503_spelta_b5b2d3fe.jpg
127.0.0.1:8000/media/uploads/IMGP1503_spelta_b5b2d3fe.jpg
E%3A/django/kuluars/media/uploads/
E:\django\kuluars\media\uploads
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