#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
This commit is contained in:
16
api/admin.py
Normal file
16
api/admin.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user