From b8834cc88edc5457b38009cc58e52f313f164374 Mon Sep 17 00:00:00 2001 From: "kam (from the studio)" Date: Mon, 3 Oct 2022 21:05:13 +0200 Subject: [PATCH] test panel --- .gitignore | 9 ++++--- static/panels/test_instrument.svg | 43 +++++++++++++++++++++++++++++++ templates/patch.html | 4 +++ workbook.py | 4 +-- 4 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 static/panels/test_instrument.svg diff --git a/.gitignore b/.gitignore index d28254a..467df2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ +.env +database.db venv/ static/cables/ -static/panels/ static/snippets/ -database.db -.env \ No newline at end of file + +!static/panels +static/panels/* +!static/panels/test_instrument.svg \ No newline at end of file diff --git a/static/panels/test_instrument.svg b/static/panels/test_instrument.svg new file mode 100644 index 0000000..824956e --- /dev/null +++ b/static/panels/test_instrument.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/patch.html b/templates/patch.html index 4bdcb1b..59e4f55 100644 --- a/templates/patch.html +++ b/templates/patch.html @@ -43,6 +43,10 @@ +
+

{{patch['description']}}

+
+
{{panel|safe}}
diff --git a/workbook.py b/workbook.py index 17a9670..28b6c59 100644 --- a/workbook.py +++ b/workbook.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template, request, redirect, url_for, jsonify +from flask import Flask, render_template, request, redirect, url_for from werkzeug.utils import secure_filename import json import sqlite3 @@ -222,4 +222,4 @@ def patch(instrument, name): -app.run(port=3146, debug=True) \ No newline at end of file +app.run(port=os.environ.get('FLASK_RUN_PORT'), debug=True) \ No newline at end of file