from adminsortable2.admin import SortableAdminMixin
from articles.models import Article, ArticleCategory, StaticVideo
from django.contrib import admin
from django_summernote.admin import SummernoteModelAdmin
from embed_video.admin import AdminVideoMixin


class ArticleAdmin(SortableAdminMixin, SummernoteModelAdmin):
    summer_note_fields = ('long_text',)
    # list_display = ('title', 'id', 'category', 'system_id', 'author', 'created', 'modified')
    # readonly_fields = ('created', 'modified')


class ArticleCategoryAdmin(admin.ModelAdmin):
    ist_display = ('name', 'id')


class StaticVideoAdmin(AdminVideoMixin, admin.ModelAdmin):
    list_display = ('system_id', 'id', 'yt_video')


admin.site.register(Article, ArticleAdmin)
admin.site.register(ArticleCategory, ArticleCategoryAdmin)
admin.site.register(StaticVideo, StaticVideoAdmin)
