mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
15 lines
599 B
Python
15 lines
599 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 = ('username', 'email', 'password',
|
|
'is_student', 'student_id_number', 'year_level', 'semester', 'avatar')
|