jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
383 stars 137 forks source link

Admin Video Mixin list_display #74

Closed afk-mario closed 2 months ago

afk-mario commented 7 years ago

Add a callable function to display the video thumbnail on list_display, something like this:

class AdminVideoMixin(object):
    def admin_video_thumbnail(self, obj):
        return u"<img src='%s' />" % VideoBackend(obj.video).thumbnail
    admin_video_thumbnail.allow_tags = True
    admin_video_thumbnail.short_description = u"Video"
SalahAdDin commented 7 years ago

PR is welcome.