mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-23 21:01:22 +00:00
Compare commits
No commits in common. "d093414ec7e62d2200d779760a17ffd36796efe7" and "1df17667539a1dd407d0987abe621b314087fc01" have entirely different histories.
d093414ec7
...
1df1766753
@ -3,7 +3,7 @@ FROM python:3.9-alpine
|
|||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
ENV DJANGO_ALLOW_ASYNC_UNSAFE 1
|
ENV DJANGO_ALLOW_ASYNC_UNSAFE 1
|
||||||
|
|
||||||
RUN apk add --no-cache gettext nginx gcc git libc-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev libmagic texlive
|
RUN apk add --no-cache gettext nginx gcc libc-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev libmagic texlive
|
||||||
|
|
||||||
RUN apk add --no-cache bash
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
|
@ -20,10 +20,6 @@ if "participation" in settings.INSTALLED_APPS:
|
|||||||
from participation.api.urls import register_participation_urls
|
from participation.api.urls import register_participation_urls
|
||||||
register_participation_urls(router, "participation")
|
register_participation_urls(router, "participation")
|
||||||
|
|
||||||
if "registration" in settings.INSTALLED_APPS:
|
|
||||||
from registration.api.urls import register_registration_urls
|
|
||||||
register_registration_urls(router, "registration")
|
|
||||||
|
|
||||||
app_name = 'api'
|
app_name = 'api'
|
||||||
|
|
||||||
# Wire up our API using automatic URL routing.
|
# Wire up our API using automatic URL routing.
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
@ -1,47 +0,0 @@
|
|||||||
# Copyright (C) 2020 by Animath
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
from rest_framework import serializers
|
|
||||||
from rest_polymorphic.serializers import PolymorphicSerializer
|
|
||||||
|
|
||||||
from ..models import AdminRegistration, CoachRegistration, ParticipantRegistration, \
|
|
||||||
StudentRegistration, VolunteerRegistration
|
|
||||||
|
|
||||||
|
|
||||||
class AdminSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = AdminRegistration
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
|
|
||||||
class CoachSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = CoachRegistration
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
|
|
||||||
class ParticipantSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = ParticipantRegistration
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
|
|
||||||
class StudentSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = StudentRegistration
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
|
|
||||||
class VolunteerSerializer(serializers.ModelSerializer):
|
|
||||||
class Meta:
|
|
||||||
model = VolunteerRegistration
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
|
|
||||||
class RegistrationSerializer(PolymorphicSerializer):
|
|
||||||
model_serializer_mapping = {
|
|
||||||
AdminRegistration: AdminSerializer,
|
|
||||||
CoachRegistration: CoachSerializer,
|
|
||||||
StudentRegistration: StudentSerializer,
|
|
||||||
VolunteerRegistration: VolunteerSerializer,
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
# Copyright (C) 2020 by Animath
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
from .views import RegistrationViewSet
|
|
||||||
|
|
||||||
|
|
||||||
def register_registration_urls(router, path):
|
|
||||||
"""
|
|
||||||
Configure router for registration REST API.
|
|
||||||
"""
|
|
||||||
router.register(path + "/registration", RegistrationViewSet)
|
|
@ -1,15 +0,0 @@
|
|||||||
# 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', ]
|
|
@ -1,7 +1,8 @@
|
|||||||
|
asgiref~=3.3.1
|
||||||
Django~=3.1
|
Django~=3.1
|
||||||
django-address~=0.2
|
django-address~=0.2
|
||||||
django-bootstrap-datepicker-plus~=3.0
|
django-bootstrap-datepicker-plus~=3.0
|
||||||
git+https://gitlab.crans.org/ynerant/django-cas-server.git
|
django-cas-server~=1.2
|
||||||
django-crispy-forms~=1.9
|
django-crispy-forms~=1.9
|
||||||
django-extensions~=3.0
|
django-extensions~=3.0
|
||||||
django-filter~=2.3
|
django-filter~=2.3
|
||||||
@ -18,7 +19,7 @@ phonenumbers~=8.9.10
|
|||||||
psycopg2-binary~=2.8
|
psycopg2-binary~=2.8
|
||||||
PyPDF3~=1.0.2
|
PyPDF3~=1.0.2
|
||||||
ipython~=7.19.0
|
ipython~=7.19.0
|
||||||
python-magic>=0.4.22
|
python-magic>=0.4.21
|
||||||
requests~=2.25.0
|
requests~=2.25.0
|
||||||
sympasoap~=1.0
|
sympasoap~=1.0
|
||||||
whoosh~=2.7
|
whoosh~=2.7
|
2
tox.ini
2
tox.ini
@ -23,7 +23,7 @@ deps =
|
|||||||
django-rest-polymorphic~=0.1
|
django-rest-polymorphic~=0.1
|
||||||
phonenumbers~=8.9.10
|
phonenumbers~=8.9.10
|
||||||
PyPDF3~=1.0.2
|
PyPDF3~=1.0.2
|
||||||
python-magic==0.4.22
|
python-magic==0.4.21
|
||||||
whoosh~=2.7
|
whoosh~=2.7
|
||||||
commands =
|
commands =
|
||||||
coverage run --source=apps,tfjm ./manage.py test apps/ tfjm/
|
coverage run --source=apps,tfjm ./manage.py test apps/ tfjm/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user