mpeltriaux
5b0b376405
* 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
21 lines
346 B
Python
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)
|