mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
16 lines
467 B
Python
16 lines
467 B
Python
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', 'section')}),
|
|
)
|
|
|
|
|
|
admin.site.register(CustomUser, CustomUserAdmin)
|