From c1ca024b4ee8310d11c213d81e566c13f3cb4f27 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 3 Dec 2023 12:20:56 +0800 Subject: [PATCH] Add is_technician field to django admin panel --- equipment_tracker/accounts/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/equipment_tracker/accounts/admin.py b/equipment_tracker/accounts/admin.py index 15220f8..eda007b 100644 --- a/equipment_tracker/accounts/admin.py +++ b/equipment_tracker/accounts/admin.py @@ -7,6 +7,9 @@ from .models import CustomUser class CustomUserAdmin(UserAdmin): model = CustomUser list_display = UserAdmin.list_display + ('is_technician',) + fieldsets = UserAdmin.fieldsets + ( + (None, {'fields': ('is_technician',)}), + ) admin.site.register(CustomUser, CustomUserAdmin)