diff --git a/py_config_gs/app.py b/py_config_gs/app.py index e788574..a2f9215 100644 --- a/py_config_gs/app.py +++ b/py_config_gs/app.py @@ -274,10 +274,16 @@ def settings_view(): if request.method == "POST": try: - config_files = request.form.getlist("config_files") + config_files_names = request.form.getlist("config_files_names") + config_files_paths = request.form.getlist("config_files_paths") video_dir = request.form.get("VIDEO_DIR") server_port = request.form.get("SERVER_PORT") + config_files = [ + {"name": name, "path": path} + for name, path in zip(config_files_names, config_files_paths) + ] + settings_data = { "VIDEO_DIR": video_dir, "SERVER_PORT": server_port, @@ -294,5 +300,6 @@ def settings_view(): return render_template("settings.html", settings=settings) + if __name__ == "__main__": app.run(host="0.0.0.0", port=SERVER_PORT) diff --git a/py_config_gs/templates/home.html b/py_config_gs/templates/home.html index c0cf194..3cc5f85 100644 --- a/py_config_gs/templates/home.html +++ b/py_config_gs/templates/home.html @@ -9,7 +9,7 @@
@@ -119,7 +119,7 @@