Add api token field to UserAdmin (#241)
This commit is contained in:
parent
2de0b9b9e1
commit
b397d1fd6a
@ -1,8 +1,15 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
|
||||
from .models import Service, User
|
||||
|
||||
|
||||
class UserAdmin(BaseUserAdmin):
|
||||
fieldsets = BaseUserAdmin.fieldsets + (
|
||||
("Extra fields", {"fields": ("api_token",)}),
|
||||
)
|
||||
|
||||
|
||||
admin.site.register(User, UserAdmin)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user