StudE-Backend/stude/accounts/admin.py

16 lines
378 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',
'year_level', 'semester', 'avatar', 'is_banned')}),
)
admin.site.register(CustomUser, CustomUserAdmin)