mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-06 12:13:02 +00:00
49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
# Copyright (C) 2020 by Animath
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
from .serializers import NoteSerializer, ParticipationSerializer, PassageSerializer, PoolSerializer, \
|
|
SolutionSerializer, SynthesisSerializer, TeamSerializer, TournamentSerializer
|
|
from ..models import Note, Participation, Passage, Pool, Solution, Synthesis, Team, Tournament
|
|
|
|
|
|
class NoteViewSet(ModelViewSet):
|
|
queryset = Note.objects.all()
|
|
serializer_class = NoteSerializer
|
|
|
|
|
|
class ParticipationViewSet(ModelViewSet):
|
|
queryset = Participation.objects.all()
|
|
serializer_class = ParticipationSerializer
|
|
|
|
|
|
class PassageViewSet(ModelViewSet):
|
|
queryset = Passage.objects.all()
|
|
serializer_class = PassageSerializer
|
|
|
|
|
|
class PoolViewSet(ModelViewSet):
|
|
queryset = Pool.objects.all()
|
|
serializer_class = PoolSerializer
|
|
|
|
|
|
class SolutionViewSet(ModelViewSet):
|
|
queryset = Solution.objects.all()
|
|
serializer_class = SolutionSerializer
|
|
|
|
|
|
class SynthesisViewSet(ModelViewSet):
|
|
queryset = Synthesis.objects.all()
|
|
serializer_class = SynthesisSerializer
|
|
|
|
|
|
class TeamViewSet(ModelViewSet):
|
|
queryset = Team.objects.all()
|
|
serializer_class = TeamSerializer
|
|
|
|
|
|
class TournamentViewSet(ModelViewSet):
|
|
queryset = Tournament.objects.all()
|
|
serializer_class = TournamentSerializer
|