2025-01-18 21:31:19 -06:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2025-01-23 20:02:28 -06:00
|
|
|
from .models import OdyseeChannel, OdyseeRelease, Tag
|
2025-01-18 23:29:52 -06:00
|
|
|
|
2025-01-23 20:02:28 -06:00
|
|
|
# Register your models here.
|
2025-01-23 21:15:18 -06:00
|
|
|
@admin.register(OdyseeChannel)
|
|
|
|
class OdyseeChannelAdmin(admin.ModelAdmin):
|
2025-01-23 23:28:01 -06:00
|
|
|
list_display = ['name', 'handle', 'description', 'id']
|
|
|
|
search_fields = ['name', 'description', 'handle']
|
|
|
|
ordering = ['name']
|
2025-01-23 21:15:18 -06:00
|
|
|
|
|
|
|
@admin.register(OdyseeRelease)
|
|
|
|
class OdyseeReleaseAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ['name', 'channel', 'url', 'id']
|
|
|
|
search_fields = ['name', 'url']
|
2025-01-23 23:28:01 -06:00
|
|
|
ordering = ['channel', 'name']
|
2025-01-23 21:15:18 -06:00
|
|
|
list_filter = ['channel', 'tags']
|
|
|
|
|
|
|
|
@admin.register(Tag)
|
|
|
|
class TagAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ['name', 'description', 'id']
|
|
|
|
search_fields = ['name']
|
2025-01-23 23:28:01 -06:00
|
|
|
ordering = ['name']
|