mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 19:02:23 +00:00
1d81213773
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
16 lines
513 B
Python
16 lines
513 B
Python
# Copyright (C) 2020 by Animath
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
from django_filters.rest_framework import DjangoFilterBackend
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
from .serializers import RegistrationSerializer
|
|
from ..models import Registration
|
|
|
|
|
|
class RegistrationViewSet(ModelViewSet):
|
|
queryset = Registration.objects.all()
|
|
serializer_class = RegistrationSerializer
|
|
filter_backends = [DjangoFilterBackend]
|
|
filterset_fields = ['user', 'participantregistration__team', ]
|