I've this hiearchy:
-mega_series
-mega_series
-series
-models.py
-views.py
...
-manage.py
-media
-covers
-static
The MEDIA_URL AND MEDIA_ROOT are the following:
MEDIA_ROOT = '/Users/lechucico/Documents/mega_series/media/'
MEDIA_URL = 'media/'
On the model I store the image like that:
class Serie (models.Model):
serie_cover = models.ImageField(upload_to='covers')
serie_name = models.CharField(max_length=100)
The images once uploaded via admin site goes correctly to path: mega_series/media/covers/
And this is how I acces it via html:
<img src="{{serie.serie_cover.url}}" width="150" height="250" />
The result url that I got is the following:
Why the image doesn't appear on the html?
Thanks.
serie.serie_cover.url
– Niyojan