mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Added relevant fields to Django admin panel
This commit is contained in:
parent
268bde7f49
commit
b6a3ae56c3
1 changed files with 11 additions and 1 deletions
|
@ -2,4 +2,14 @@ from django.contrib import admin
|
||||||
from django.contrib.auth.admin import UserAdmin
|
from django.contrib.auth.admin import UserAdmin
|
||||||
from .models import CustomUser
|
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)
|
||||||
|
|
Loading…
Reference in a new issue