synthea_webservice/webservice/apps/api/admin.py
2020-11-13 15:31:14 +01:00

10 lines
337 B
Python

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')