15 lines
419 B
Python
15 lines
419 B
Python
from django.contrib import admin
|
|
|
|
from .models import ApiToken, UserProfile
|
|
|
|
|
|
@admin.register(UserProfile)
|
|
class UserProfileAdmin(admin.ModelAdmin):
|
|
list_display = ('user', 'joined')
|
|
search_fields = ('user__username',)
|
|
|
|
|
|
@admin.register(ApiToken)
|
|
class ApiTokenAdmin(admin.ModelAdmin):
|
|
list_display = ('user', 'label', 'key_prefix', 'created_at', 'last_used')
|
|
search_fields = ('user__username', 'label') |