konova/api/admin.py
mpeltriaux 881da38538 #31 API basic implementation
* adds new app to project
* adds relation between User model and new APIUserToken model
* adds first implementation for GET of intervention
* adds basic code layout for future extension by having new versions
2022-01-21 15:26:08 +01:00

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)