Borrowing-TrackerBackend/equipment_tracker/accounts/admin.py

17 lines
456 B
Python
Raw Normal View History

2023-11-09 19:48:13 +08:00
from django import forms
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
model = CustomUser
list_display = UserAdmin.list_display + \
('is_technician', 'is_teacher', 'id')
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('is_technician', 'is_teacher', 'course')}),
)
2023-11-09 19:48:13 +08:00
admin.site.register(CustomUser, CustomUserAdmin)