S
S
Smeecy Smeecy2016-11-29 13:39:37
Django
Smeecy Smeecy, 2016-11-29 13:39:37

The path to the picture. ImageField?

Good day to all! I'm just starting to learn Django. I'm trying to add a picture to the post (via ImageField), the picture is loaded into the right folder, but I can't figure out what to write in img src=" ??? ", and another question about MEDIA_URL and MEDIA_ROOT, which folder is the path for?
07964c7435285771a19882018f605160.png
ea13352414b028a6d5b8dc98957dac01.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2016-11-29
@Wekeed

<img src="{{ post.image.url }}">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question