django: Display image in admin interface

Posted by Oleg Tarasenko on Stack Overflow See other posts from Stack Overflow or by Oleg Tarasenko
Published on 2010-03-14T20:56:39Z Indexed on 2010/03/14 21:05 UTC
Read the original article Hit count: 445

Filed under:
|

Hi,

I've defined a model which contains a link an image. Is there a way to display the image in the model items list. (e.g. if I defined an article this way:

class Article(models.Model):
    url = models.CharField(max_length = 200, unique = True, help_text="/lessons/")
    title = models.CharField(max_length = 500)
    img = models.CharField(max_length = 100) # Contains path to image

    def __unicode__(self):
       return u"%s" %title

)

Is there a way to display image together with title?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-models