tubesync/app/sync/admin.py

21 lines
479 B
Python

from django.contrib import admin
from .models import Source, Media
@admin.register(Source)
class SourceAdmin(admin.ModelAdmin):
ordering = ('-created',)
list_display = ('name',)
readonly_fields = ('uuid', 'created')
search_fields = ('uuid', 'key', 'name')
@admin.register(Media)
class MediaAdmin(admin.ModelAdmin):
ordering = ('-created',)
list_display = ('url',)
readonly_fields = ('uuid', 'created')
search_fields = ('uuid', 'key', 'url')