Add is_technician field to django admin panel

This commit is contained in:
Keannu Bernasol 2023-12-03 12:20:56 +08:00
parent f8bc36a2c4
commit c1ca024b4e

View file

@ -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)