This commit is contained in:
Prince Kurt Laurence 2024-01-24 22:39:43 +08:00
commit 43b6180779
2 changed files with 1 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class CustomUserAdmin(UserAdmin):
list_display = UserAdmin.list_display + \ list_display = UserAdmin.list_display + \
('is_technician', 'is_teacher', 'id') ('is_technician', 'is_teacher', 'id')
fieldsets = UserAdmin.fieldsets + ( fieldsets = UserAdmin.fieldsets + (
(None, {'fields': ('is_technician', 'is_teacher', 'course')}), (None, {'fields': ('is_technician', 'is_teacher', 'course', 'section')}),
) )

View file

@ -10,8 +10,6 @@ from django.core.cache import cache
class CustomUserSerializer(serializers.ModelSerializer): class CustomUserSerializer(serializers.ModelSerializer):
name = serializers.CharField(source='__str__') name = serializers.CharField(source='__str__')
course = serializers.CharField()
section = serializers.CharField()
class Meta: class Meta:
model = CustomUser model = CustomUser