from django.contrib import admin
from .models import Token

@admin.register(Token)
class TokenAdmin(admin.ModelAdmin):
    list_display    = ('key', 'user','is_supertoken', 'last_access')
    ordering        = ('-last_access', 'user', )
    search_fields   = ('key', 'user__username',)
    readonly_fields = ('created_at', 'updated_at')