17 lines
301 B
Python
17 lines
301 B
Python
|
from django.contrib import admin
|
||
|
|
||
|
from api.models.token import APIUserToken
|
||
|
|
||
|
|
||
|
class APITokenAdmin(admin.ModelAdmin):
|
||
|
list_display = [
|
||
|
"token",
|
||
|
"valid_until",
|
||
|
"is_active",
|
||
|
]
|
||
|
readonly_fields = [
|
||
|
"token"
|
||
|
]
|
||
|
|
||
|
admin.site.register(APIUserToken, APITokenAdmin)
|