diff --git a/app/views/users.py b/app/views/users.py index 983ab5a4c..3cd5af136 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -469,7 +469,7 @@ def create_user_form(REQUEST, user_name=None, edit=0): def import_users_generate_excel_sample(REQUEST): "une feuille excel pour importation utilisateurs" data = sco_import_users.generate_excel_sample() - return sco_excel.send_excel_file(REQUEST, data, "ImportUtilisateurs") + return sco_excel.send_excel_file(REQUEST, data, "ImportUtilisateurs.xlsx") @bp.route("/import_users_form", methods=["GET", "POST"]) @@ -523,16 +523,20 @@ def import_users_form(REQUEST=None): if tf[0] == 0: return "\n".join(H) + tf[1] + "" + help + F elif tf[0] == -1: - return flask.redirect(back_url) + return flask.redirect(url_for("scodoc.index")) else: # IMPORT ok, diag = sco_import_users.import_excel_file(tf[2]["xlsfile"]) - # TODO Afficher la liste des messages - H = [html_sco_header.sco_header(page_title="Import utilisateurs")] - H.append("
Ok, Import terminé !
") @@ -542,7 +546,6 @@ def import_users_form(REQUEST=None): H.append("Erreur, importation annulée !
") H.append('' % dest) return "\n".join(H) + html_sco_header.sco_footer() - return "\n".join(H) + help + F @bp.route("/user_info_page")