21 lines
550 B
Python
21 lines
550 B
Python
from django.contrib import admin
|
|
from .models import Source, Media
|
|
|
|
|
|
@admin.register(Source)
|
|
class SourceAdmin(admin.ModelAdmin):
|
|
|
|
ordering = ('-created',)
|
|
list_display = ('name', 'get_source_type_display', 'last_crawl', 'has_failed')
|
|
readonly_fields = ('uuid', 'created')
|
|
search_fields = ('uuid', 'key', 'name')
|
|
|
|
|
|
@admin.register(Media)
|
|
class MediaAdmin(admin.ModelAdmin):
|
|
|
|
ordering = ('-created',)
|
|
list_display = ('key', 'source')
|
|
readonly_fields = ('uuid', 'created')
|
|
search_fields = ('uuid', 'source__key', 'key')
|