jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.

Home Page:http://django-embed-video.rtfd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admin Video Mixin list_display

afk-mario opened this issue · comments

commented

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"

PR is welcome.