2024-01-07 19:46:48 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.contrib.auth.admin import UserAdmin
|
|
|
|
|
|
|
|
from authentication.models import ExtendedUser
|
|
|
|
|
|
|
|
|
|
|
|
class ExtendedUserAdmin(UserAdmin):
|
|
|
|
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_superuser')
|
|
|
|
search_fields = ('username', 'email', 'first_name', 'last_name')
|
|
|
|
ordering = ('username',)
|
|
|
|
filter_horizontal = ('groups', 'user_permissions', 'permissions')
|
|
|
|
|
2024-05-02 20:53:13 +00:00
|
|
|
# def permissions(self, obj):
|
|
|
|
# return ', '.join(obj.get_all_permissions())
|
|
|
|
|
2024-01-07 19:46:48 +00:00
|
|
|
|
|
|
|
admin.site.register(ExtendedUser, ExtendedUserAdmin)
|