diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/users/admin.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ctrack/users/admin.py b/ctrack/users/admin.py new file mode 100644 index 0000000..120cc64 --- /dev/null +++ b/ctrack/users/admin.py @@ -0,0 +1,17 @@ +from django.contrib import admin +from django.contrib.auth import admin as auth_admin +from django.contrib.auth import get_user_model + +from ctrack.users.forms import UserChangeForm, UserCreationForm + +User = get_user_model() + + +@admin.register(User) +class UserAdmin(auth_admin.UserAdmin): + + form = UserChangeForm + add_form = UserCreationForm + fieldsets = (("User", {"fields": ("name",)}),) + auth_admin.UserAdmin.fieldsets + list_display = ["username", "name", "is_superuser"] + search_fields = ["name"] |