2👍
As per the documentation
MEDIA_ROOT
is the Absolute filesystem path to the directory that will hold user-uploaded files.
Your code that pushes the uploaded Images to the root should have settings.MEDIA_ROOT/<sub-folder>
instead of settings.MEDIA_URL
MEDIA_URL
on the other hand is a placeholder for the url
a client should hit to access your media. This is useful when you don’t want to keep your media on your local filesystem, but to an external storage like amazon s3.
Using {{MEDIA_URL}}
in your templates gives you a good way of not hard-coding the eventual media location.
0👍
first of all in the settings.py MEDIA_URL must be like this:
MEDIA_URL = "/media/"
Then delete MEDIA folder. Only media folder is enough.
and also if you need thumbnails for your uploaded images you can use Django easy_thumbnails package for this
- [Answered ]-Google SDK gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte
- [Answered ]-Select all records from the parent table assuming something is present in the child
- [Answered ]-Cant figure out right queryset for json in django