|
|
|
|
@ -15,9 +15,9 @@ class UserSerializer(serializers.ModelSerializer): |
|
|
|
|
return user |
|
|
|
|
|
|
|
|
|
class Meta: |
|
|
|
|
# club_id = serializers.PrimaryKeyRelatedField(queryset=Club.objects.all()) |
|
|
|
|
club_id = serializers.PrimaryKeyRelatedField(queryset=Club.objects.all()) |
|
|
|
|
model = CustomUser |
|
|
|
|
fields = ['id', 'username', 'password', 'club', 'umpire_code', 'clubs', 'phone', 'first_name', 'last_name', 'licence_id'] |
|
|
|
|
fields = ['id', 'username', 'password', 'umpire_code', 'clubs', 'phone', 'first_name', 'last_name', 'licence_id'] |
|
|
|
|
|
|
|
|
|
class ClubSerializer(serializers.ModelSerializer): |
|
|
|
|
class Meta: |
|
|
|
|
@ -76,7 +76,7 @@ class TeamRegistrationSerializer(serializers.ModelSerializer): |
|
|
|
|
# match_id = serializers.PrimaryKeyRelatedField(queryset=Match.objects.all()) |
|
|
|
|
# group_stage_id = serializers.PrimaryKeyRelatedField(queryset=GroupStage.objects.all()) |
|
|
|
|
model = TeamRegistration |
|
|
|
|
fields = ['id', 'match', 'group_stage', 'registration_date', 'call_date', 'initial_position', |
|
|
|
|
fields = ['id', 'group_stage', 'registration_date', 'call_date', 'initial_position', |
|
|
|
|
'group_stage_position', 'logo'] |
|
|
|
|
|
|
|
|
|
class PlayerRegistrationSerializer(serializers.ModelSerializer): |
|
|
|
|
|