forked from ScoDoc/ScoDoc
correction des pluriels dans les routes
This commit is contained in:
parent
8637c81f78
commit
53f3ec7294
@ -20,11 +20,11 @@ from app.scodoc import sco_groups
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
|
||||
|
||||
@bp.route("/etudiants/courant", defaults={"long": False})
|
||||
@bp.route("/etudiants/courant/long", defaults={"long": True})
|
||||
@bp.route("/etudiants/courants", defaults={"long": False})
|
||||
@bp.route("/etudiants/courants/long", defaults={"long": True})
|
||||
@token_auth.login_required
|
||||
@token_permission_required(Permission.APIView)
|
||||
def etudiants_courant(long=False):
|
||||
def etudiants_courants(long=False):
|
||||
"""
|
||||
Liste des étudiants inscrits dans un formsemestre actuellement en cours.
|
||||
|
||||
@ -236,41 +236,74 @@ def etudiant_formsemestres(etudid: int = None, nip: int = None, ine: int = None)
|
||||
@bp.route(
|
||||
"/etudiant/etudid/<int:etudid>/formsemestre/<int:formsemestre_id>/bulletin",
|
||||
methods=["GET"],
|
||||
defaults={"version": "long"},
|
||||
defaults={"version": "long", "pdf": False},
|
||||
)
|
||||
@bp.route(
|
||||
"/etudiant/nip/<string:nip>/formsemestre/<int:formsemestre_id>/bulletin",
|
||||
methods=["GET"],
|
||||
defaults={"version": "long"},
|
||||
defaults={"version": "long", "pdf": False},
|
||||
)
|
||||
@bp.route(
|
||||
"/etudiant/ine/<string:ine>/formsemestre/<int:formsemestre_id>/bulletin",
|
||||
methods=["GET"],
|
||||
defaults={"version": "long"},
|
||||
defaults={"version": "long", "pdf": False},
|
||||
)
|
||||
# Version PDF non fonctionnelle
|
||||
# @bp.route(
|
||||
# "/etudiant/etudid/<int:etudid>/formsemestre/<int:formsemestre_id>/bulletin/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "long", "pdf": True},
|
||||
# )
|
||||
# @bp.route(
|
||||
# "/etudiant/nip/<string:nip>/formsemestre/<int:formsemestre_id>/bulletin/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "long", "pdf": True},
|
||||
# )
|
||||
# @bp.route(
|
||||
# "/etudiant/ine/<string:ine>/formsemestre/<int:formsemestre_id>/bulletin/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "long", "pdf": True},
|
||||
# )
|
||||
@bp.route(
|
||||
"/etudiant/etudid/<int:etudid>/formsemestre/<int:formsemestre_id>/bulletin/short",
|
||||
methods=["GET"],
|
||||
defaults={"version": "short"},
|
||||
defaults={"version": "short", "pdf": False},
|
||||
)
|
||||
@bp.route(
|
||||
"/etudiant/nip/<string:nip>/formsemestre/<int:formsemestre_id>/bulletin/short",
|
||||
methods=["GET"],
|
||||
defaults={"version": "short"},
|
||||
defaults={"version": "short", "pdf": False},
|
||||
)
|
||||
@bp.route(
|
||||
"/etudiant/ine/<string:ine>/formsemestre/<int:formsemestre_id>/bulletin/short",
|
||||
methods=["GET"],
|
||||
defaults={"version": "short"},
|
||||
defaults={"version": "short", "pdf": False},
|
||||
)
|
||||
# Version PDF non fonctionnelle
|
||||
# @bp.route(
|
||||
# "/etudiant/etudid/<int:etudid>/formsemestre/<int:formsemestre_id>/bulletin/short/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "short", "pdf": True},
|
||||
# )
|
||||
# @bp.route(
|
||||
# "/etudiant/nip/<string:nip>/formsemestre/<int:formsemestre_id>/bulletin/short/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "short", "pdf": True},
|
||||
# )
|
||||
# @bp.route(
|
||||
# "/etudiant/ine/<string:ine>/formsemestre/<int:formsemestre_id>/bulletin/short/pdf",
|
||||
# methods=["GET"],
|
||||
# defaults={"version": "short", "pdf": True},
|
||||
# )
|
||||
@token_auth.login_required
|
||||
@token_permission_required(Permission.APIView)
|
||||
def etudiant_bulletin_semestre(
|
||||
def etudiant_bulletin_semestre( # XXX TODO Ajouter la possibilité de retourner en version pdf
|
||||
formsemestre_id,
|
||||
etudid: int = None,
|
||||
nip: str = None,
|
||||
ine: str = None,
|
||||
version="long",
|
||||
# pdf: bool = False,
|
||||
):
|
||||
"""
|
||||
Retourne le bulletin d'un étudiant en fonction de son id et d'un semestre donné
|
||||
|
@ -52,8 +52,8 @@ def partition(formsemestre_id: int):
|
||||
return jsonify(data)
|
||||
|
||||
|
||||
@bp.route("/partitions/groups/<int:group_id>", methods=["GET"])
|
||||
@bp.route("/partitions/groups/<int:group_id>/etat/<string:etat>", methods=["GET"])
|
||||
@bp.route("/partition/group/<int:group_id>", methods=["GET"])
|
||||
@bp.route("/partition/group/<int:group_id>/etat/<string:etat>", methods=["GET"])
|
||||
@token_auth.login_required
|
||||
@token_permission_required(Permission.APIView)
|
||||
def etud_in_group(group_id: int, etat=None):
|
||||
|
Loading…
Reference in New Issue
Block a user