StudE-Backend/stude/accounts/admin.py

16 lines
392 B
Python
Raw Normal View History

2023-06-26 19:10:04 +08:00
from django.contrib import admin
2023-06-26 19:45:58 +08:00
from django.contrib.auth.admin import UserAdmin
from .models import CustomUser
2023-06-26 19:10:04 +08:00
class CustomUserAdmin(UserAdmin):
model = CustomUser
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('student_id_number',
2023-06-27 00:10:14 +08:00
'year_level', 'semester', 'avatar', 'is_student', 'is_banned')}),
)
admin.site.register(CustomUser, CustomUserAdmin)