mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-27 07:02:22 +00:00
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', ]
|