# api/admin.py
from django.contrib import admin
from .models import Link, LinkGroup

@admin.register(Link)
class LinkAdmin(admin.ModelAdmin):
    list_display = ('title', 'url', 'owner', 'group', 'order')
    list_filter = ('owner', 'group')
    search_fields = ('title', 'url')

@admin.register(LinkGroup)
class LinkGroupAdmin(admin.ModelAdmin):
    list_display = ('name', 'owner', 'order')
    list_filter = ('owner',)
    search_fields = ('name',)
    ordering = ('owner', 'order')
