[Answered ]-How to add images in Django Admin list view?

2👍

I have done something similar in the past. You go in your model and do something like this:

def image_img(self):
        if self.offer_image:
            return u'<img src="%s"  height="100px"/>' % self.offer_image
        else:
            return 'No_image'
image_img.short_description = 'Image'
image_img.allow_tags = True

Then, in the admin of the app you include the ‘image_img’ in the list_display list 🙂

Leave a comment