konova/user/admin.py
mpeltriaux 02970b19b4 # 63 Refactoring
* refactors django User model to custom User model to provide further attributes and methods directly on the user model
2022-01-12 12:56:22 +01:00

35 lines
697 B
Python

from django.contrib import admin
from user.models import UserNotification, UserActionLogEntry, User
class UserNotificationAdmin(admin.ModelAdmin):
list_display = [
"id",
"name",
"is_active",
]
class UserAdmin(admin.ModelAdmin):
list_display = [
"id",
"username",
"first_name",
"last_name",
"email",
]
class UserActionLogEntryAdmin(admin.ModelAdmin):
list_display = [
"id",
"user",
"timestamp",
"action",
]
admin.site.register(UserNotification, UserNotificationAdmin)
admin.site.register(UserActionLogEntry, UserActionLogEntryAdmin)
admin.site.register(User, UserAdmin)