tubesync/app/sync/admin.py

21 lines
550 B
Python
Raw Normal View History

2020-11-23 06:32:02 +00:00
from django.contrib import admin
from .models import Source, Media
@admin.register(Source)
class SourceAdmin(admin.ModelAdmin):
ordering = ('-created',)
2020-12-07 10:26:46 +00:00
list_display = ('name', 'get_source_type_display', 'last_crawl', 'has_failed')
2020-11-23 06:32:02 +00:00
readonly_fields = ('uuid', 'created')
search_fields = ('uuid', 'key', 'name')
@admin.register(Media)
class MediaAdmin(admin.ModelAdmin):
ordering = ('-created',)
2020-11-26 05:04:57 +00:00
list_display = ('key', 'source')
2020-11-23 06:32:02 +00:00
readonly_fields = ('uuid', 'created')
2020-11-26 05:04:57 +00:00
search_fields = ('uuid', 'source__key', 'key')