diff --git a/.gitignore b/.gitignore index 5ffda7e..52a71cb 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,4 @@ cython_debug/ .idea/ config.env +.DS_Store diff --git a/config.py b/config.py index 4a7b935..ef9b6c0 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,7 @@ import os +from dotenv import load_dotenv + +load_dotenv() BASE_URL = os.getenv('OPENSPOOLMAN_BASE_URL') # Where will this app be accessible PRINTER_ID = os.getenv('PRINTER_ID') # Printer serial number - Run init_bambulab.py diff --git a/requirements.txt b/requirements.txt index 9697a21..1a9c44f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ requests==2.32.3 flask==3.1.0 pyopenssl==24.3.0 gunicorn==23.0.0 +python-dotenv \ No newline at end of file diff --git a/templates/fragments/tray.html b/templates/fragments/tray.html index e961a69..b1f8367 100644 --- a/templates/fragments/tray.html +++ b/templates/fragments/tray.html @@ -13,13 +13,18 @@
+ {% if tray_data.tray_type %} {{ tray_data.tray_type }} {% if tray_data.tray_sub_brands %}
{{ tray_data.tray_sub_brands }} {% endif %} + {% else %} + Empty + {% endif %}
+ {% if tray_data.tray_type %} {{ tray_data.remain }}% {% endif %}
+ {% endif %}