Added relevant fields to Django admin panel

This commit is contained in:
Keannu Bernasol 2023-06-27 00:06:20 +08:00
parent 268bde7f49
commit b6a3ae56c3

View file

@ -2,4 +2,14 @@ from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import CustomUser
admin.site.register(CustomUser, UserAdmin)
class CustomUserAdmin(UserAdmin):
model = CustomUser
fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('student_id_number',
'year_level', 'semester', 'avatar', 'is_banned')}),
)
admin.site.register(CustomUser, CustomUserAdmin)