Answer the question
In order to leave comments, you need to log in
How does django ImageField.url work?
After writing in the ImageField field, the image was saved in the project root in the media folder. When accessing a database like test.image.url, it gives the path /media/image.jpg, but I can access the image itself only through the link mysite.ru/myapp/media/image.jpg, there is no media folder in myapp at all. How to solve this issue, inserting the name of the application everywhere is such an idea.
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