class embed_video.admin.AdminVideoMixin[source]

Mixin using AdminVideoWidget for fields with EmbedVideoField.


from django.contrib import admin
from embed_video.admin import AdminVideoMixin
from .models import MyModel

class MyModelAdmin(AdminVideoMixin, admin.ModelAdmin):
    pass, MyModelAdmin)
formfield_for_dbfield(db_field, **kwargs)[source]
class embed_video.admin.AdminVideoWidget(attrs=None)[source]

Widget for video input in administration. If empty it works just like django.forms.TextInput. Otherwise it renders embedded video together with input field.


Django 1.6 provides better parent for this widget - django.forms.URLInput.

render(name, value='', attrs=None, size=(420, 315))[source]