Generateurv2/backend/api/room/serializers.py

19 lines
467 B
Python
Raw Normal View History

2022-05-18 10:15:54 +02:00
from rest_framework import serializers
from .models import Room, Parcours
class RoomSerializer(serializers.ModelSerializer):
exo_model = ''
class Meta:
model = Room
2022-06-11 23:39:03 +02:00
fields = ('id', 'name', 'id_code', 'anonymousMembers')
2022-05-18 10:15:54 +02:00
class ParcoursSerializer(serializers.ModelSerializer):
exo_model = ''
class Meta:
model = Parcours
fields = ('id', 'name', 'id_code',
'timer', 'exercices', 'success_condition') # + challenger ?