konova/api/admin.py
mpeltriaux b0f3505972 #99 Admin backend cleanup
* removes admin backend views which are not important for production
* adds filtering functionalities on index views
* simplifies detail views on intervention, compensation, ecoaccount and ema
* adds autocomplete fields on detail views
* adds handy horizontal filter fields on detail views
2022-02-01 18:41:02 +01:00

21 lines
346 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"
]
search_fields = [
"token"
]
admin.site.register(APIUserToken, APITokenAdmin)