1
0
forked from ScoDoc/ScoDoc

fix route conflict

This commit is contained in:
Emmanuel Viennet 2021-07-04 12:42:04 +02:00
parent c9310d358e
commit 4526a6b934
3 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ moment = Moment()
@app.before_request
def open_dept_db_connection():
# current_app.logger.info("open_dept_db_connection")
if hasattr(g, "scodoc_dept") and not hasattr(g, "db_conn"):
if hasattr(g, "scodoc_dept") and not hasattr(g, "db_conn") and g.scodoc_dept:
g.db_conn = ndb.open_dept_connection()

View File

@ -141,9 +141,9 @@ def a_zope_form_post(REQUEST=None):
return "\n".join(H)
@bp.route("/ScoDoc/<dept_id>/Scolarite/Notes/formsemestre_status")
@bp.route("/ScoDoc/<dept_id>/Scolarite/Notes/formsemestre_statux")
@scodoc7func(context)
def formsemestre_status(dept_id=None, formsemestre_id=None, REQUEST=None):
def formsemestre_statux(dept_id=None, formsemestre_id=None, REQUEST=None):
"""Essai méthode de département
Le contrôle d'accès doit vérifier les bons rôles : ici Ens<dept_id>
"""

View File

@ -28,7 +28,7 @@
non protégé renvoyant vers une page protégée</li>
<li><a href="{{ url_for('main.formsemestre_status', dept_id='RT') }}"><tt>formsemestre_status</tt></a> : a-t-on
<li><a href="{{ url_for('main.formsemestre_statux', dept_id='RT') }}"><tt>formsemestre_statux</tt></a> : a-t-on
le rôle EnsRT ?
</li>
<li><a href="ScoDoc/RT/Scolarite/Notes/essai"><tt>Notes/essai</tt> : test "notes", url