mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 14:29:25 +08:00
16 lines
548 B
Python
16 lines
548 B
Python
|
from djoser.serializers import UserCreateSerializer as BaseUserRegistrationSerializer
|
||
|
from djoser.serializers import UserSerializer as BaseUserSerializer
|
||
|
from accounts.models import CustomUser
|
||
|
|
||
|
|
||
|
class CustomUserSerializer(BaseUserSerializer):
|
||
|
class Meta(BaseUserSerializer.Meta):
|
||
|
model = CustomUser
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class UserRegistrationSerializer(BaseUserRegistrationSerializer):
|
||
|
class Meta(BaseUserRegistrationSerializer.Meta):
|
||
|
fields = ('is_student',
|
||
|
'is_banned', 'year_level', 'semester')
|