I am trying to show an image but every time image is broken:
settings.py
MEDIA_ROOT = "media/"
models.py
image = models.ImageField(null=True, blank=True, upload_to='article_image/')
Template (presenter.html)
<img src="{{ art.image.path }}">
The path looks like this /home/mikemoix/IdeaProjects/vlad/media/article_image/aptitude_test1.gif
What can I do?
{{art.image.ur}], which will give you the link version, rather than{{art.image.path}}, which gives you the file system path. You also might need to change yourMEDIA_ROOTto "/media/" -- but that would depend on what your file structure actually looks like