소스 검색

[videos] Add channel admin access

Colin Powell 7 달 전
부모
커밋
9a1508b7a6
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      vrobbler/apps/videos/admin.py

+ 8 - 1
vrobbler/apps/videos/admin.py

@@ -1,9 +1,16 @@
 from django.contrib import admin
 from scrobbles.models import Scrobble
-from videos.models import Series, Video
+from videos.models import Series, Video, Channel
 from scrobbles.admin import ScrobbleInline
 
 
+@admin.register(Channel)
+class ChannelAdmin(admin.ModelAdmin):
+    date_hierarchy = "created"
+    list_display = ("name", "youtube_id")
+    ordering = ("-created",)
+
+
 @admin.register(Series)
 class SeriesAdmin(admin.ModelAdmin):
     date_hierarchy = "created"