1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-27 05:33:03 +00:00
plateforme-tfjm2/apps/registration/api/views.py

16 lines
513 B
Python
Raw Normal View History

2021-03-29 14:24:58 +00:00
# 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', ]