Re: Display image in template

2019-05-28 Thread anchal agarwal
Thanks Nitin. It worked !! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django

Re: Display image in template

2019-05-28 Thread Joe Reitman
Have you looked in inspector on your browser to see if the URL is correctly rendered in IMG SRC? Have you installed Pillow? ImageField requires python Pillow. On Tuesday, May 28, 2019 at 1:38:49 PM UTC-5, Anchal Agarwal wrote: > > Thanks for the answer but I have already set the MEDIA path > he

Re: Display image in template

2019-05-28 Thread Nitin Kumar
{{ album.album_logo.url }} On Wed, 29 May, 2019, 12:08 AM anchal agarwal Thanks for the answer but I have already set the MEDIA path > here is my urls.py > from . import settings > from django.contrib.staticfiles.urls import static > from django.contrib.staticfiles.urls import staticfiles_urlpat

Re: Display image in template

2019-05-28 Thread anchal agarwal
Thanks for the answer but I have already set the MEDIA path here is my urls.py from . import settings from django.contrib.staticfiles.urls import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA

Re: Display image in template

2019-05-28 Thread Anirudh Jain
You will have to setup MEDIA path f8rst. All your uploded files will be stored in that folder. STATIC path is used only for, well, static content like css and js. On Tue, 28 May 2019, 23:31 anchal agarwal, wrote: > I want to display image dynamically from the database in a django > template. I h