From: Eric Fayolle Date: Mon, 7 Feb 2022 11:11:01 +0000 (+0100) Subject: MAJ X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c2bcc3d65c3351924a6a073b0bd59509ce0d81a8;p=tools%2Feficas.git MAJ --- diff --git a/testFlask/mdm.py b/testFlask/mdm.py index 5fd67d99..bb54b54f 100755 --- a/testFlask/mdm.py +++ b/testFlask/mdm.py @@ -1,7 +1,7 @@ # coding: utf-8 #!/usr/bin/env python3 import sys -sys.path.append('/home/eric/FLASK/eficas.eecj.git/testFlask') +sys.path.append('/home/eric/FLASK/eficas.eecj.git/testFlask') #TODO : supprimer from connectEficas import accasConnecteur code='Essai' @@ -38,7 +38,7 @@ app = Flask(__name__) # configure_uploads(app, catalogs) -app.config['SECRET_KEY'] = 'hard to guess string' +app.config['SECRET_KEY'] = os.urandom(24) app.config['UPLOAD_FOLDER'] = 'data/' app.config['THUMBNAIL_FOLDER'] = 'data/thumbnail/' app.config['MAX_CONTENT_LENGTH'] = 50 * 1024 * 1024 @@ -46,6 +46,9 @@ app.config['MAX_CONTENT_LENGTH'] = 50 * 1024 * 1024 ALLOWED_EXTENSIONS = set(['py','comm','txt', 'gif', 'png', 'jpg', 'jpeg', 'bmp', 'rar', 'zip', '7zip', 'doc', 'docx']) IGNORED_FILES = set(['.gitignore']) +#TODO: +#from fileManagement import * + def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS diff --git a/testFlask/templates/base.html b/testFlask/templates/base.html index 58569be5..9e7b4e08 100644 --- a/testFlask/templates/base.html +++ b/testFlask/templates/base.html @@ -37,7 +37,7 @@ - + @@ -47,11 +47,20 @@ + + + + + + + + + @@ -157,6 +166,8 @@ {% block file_management %} {% endblock %} + {% block available_catalogs %} {% endblock %} + {% block content %} {% endblock %} diff --git a/testFlask/templates/commandes_2.html b/testFlask/templates/commandes_2.html index 258d73a8..4fa42f62 100644 --- a/testFlask/templates/commandes_2.html +++ b/testFlask/templates/commandes_2.html @@ -1,4 +1,4 @@ -{% extends 'file_management.html' %} +{% extends 'available_catalogs.html' %} {% block content %} diff --git a/testFlask/templates/main_menu.html b/testFlask/templates/main_menu.html index 4458abd7..d80fc019 100644 --- a/testFlask/templates/main_menu.html +++ b/testFlask/templates/main_menu.html @@ -24,7 +24,9 @@