forked from ScoDoc/ScoDoc
Merge PE v4
This commit is contained in:
parent
ce63b7f2f5
commit
5c9126d263
@ -187,7 +187,7 @@ def dept_etudiants(acronym: str):
|
||||
]
|
||||
"""
|
||||
dept = Departement.query.filter_by(acronym=acronym).first_or_404()
|
||||
return [etud.to_dict_short() for etud in dept.etats_civils]
|
||||
return [etud.to_dict_short() for etud in dept.etudiants]
|
||||
|
||||
|
||||
@bp.route("/departement/id/<int:dept_id>/etudiants")
|
||||
@ -200,7 +200,7 @@ def dept_etudiants_by_id(dept_id: int):
|
||||
Retourne la liste des étudiants d'un département d'id donné.
|
||||
"""
|
||||
dept = Departement.query.get_or_404(dept_id)
|
||||
return [etud.to_dict_short() for etud in dept.etats_civils]
|
||||
return [etud.to_dict_short() for etud in dept.etudiants]
|
||||
|
||||
|
||||
@bp.route("/departement/<string:acronym>/formsemestres_ids")
|
||||
|
@ -61,11 +61,11 @@ class DevConfig(Config):
|
||||
DEBUG = True
|
||||
TESTING = False
|
||||
SQLALCHEMY_DATABASE_URI = (
|
||||
os.environ.get("SCODOC_DATABASE_URI") or "postgresql:///SCODOC"
|
||||
os.environ.get("SCODOC_DATABASE_URI") or "postgresql:///SCODOC_DEV"
|
||||
)
|
||||
SECRET_KEY = os.environ.get("DEV_SECRET_KEY") or "bb3faec7d9a34eb68a8e3e710087d87a"
|
||||
# pour le avoir url_for dans le shell:
|
||||
SERVER_NAME = "http://localhost:8080"
|
||||
# SERVER_NAME = os.environ.get("SCODOC_TEST_SERVER_NAME") or "localhost"
|
||||
|
||||
|
||||
class TestConfig(DevConfig):
|
||||
|
Loading…
Reference in New Issue
Block a user