mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 08:28:49 +02:00
Add api endpoints for tweaks and payments
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -4,8 +4,8 @@ from django_filters.rest_framework import DjangoFilterBackend
|
||||
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
|
||||
SolutionSerializer, SynthesisSerializer, TeamSerializer, TournamentSerializer, TweakSerializer
|
||||
from ..models import Note, Participation, Passage, Pool, Solution, Synthesis, Team, Tournament, Tweak
|
||||
|
||||
|
||||
class NoteViewSet(ModelViewSet):
|
||||
@ -67,3 +67,11 @@ class TournamentViewSet(ModelViewSet):
|
||||
'inscription_limit', 'solution_limit', 'solutions_draw', 'syntheses_first_phase_limit',
|
||||
'solutions_available_second_phase', 'syntheses_second_phase_limit',
|
||||
'description', 'organizers', 'final', ]
|
||||
|
||||
|
||||
class TweakViewSet(ModelViewSet):
|
||||
queryset = Tweak.objects.all()
|
||||
serializer_class = TweakSerializer
|
||||
filter_backends = [DjangoFilterBackend]
|
||||
filterset_fields = ['pool', 'pool__tournament', 'pool__tournament__name', 'participation',
|
||||
'participation__team__trigram', 'diff', ]
|
||||
|
Reference in New Issue
Block a user