Fix bug: if you create token in django admin, token field is empty

This commit is contained in:
2022-09-25 17:23:31 +03:00
parent 5017e004c2
commit bf4af285e8
3 changed files with 42 additions and 10 deletions

View File

@@ -2,4 +2,7 @@ from django.contrib import admin
from .models import *
admin.site.register(UserToken)
@admin.register(UserToken)
class DevEventAdmin(admin.ModelAdmin):
readonly_fields = ['access_token']
fields = ['user', 'creation_time', 'access_token']