diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f35db13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +config.py +api-call diff --git a/__pycache__/config.cpython-312.pyc b/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000..ebe9efb Binary files /dev/null and b/__pycache__/config.cpython-312.pyc differ diff --git a/api-call b/api-call deleted file mode 100644 index 1eb26bb..0000000 --- a/api-call +++ /dev/null @@ -1 +0,0 @@ -http://192.168.189.118:8000/toniecloud/gettags diff --git a/app.py b/app.py index c0b9407..bb42c19 100644 --- a/app.py +++ b/app.py @@ -8,13 +8,14 @@ from flask import Flask, render_template_string, request, session, redirect, url from flask_cors import CORS from playwright.async_api import async_playwright import requests +import config # Konfiguration -PASSWORD = 'toniessindteuer' -BASE_DIR = '/mnt/NAS/Toniebox/' +PASSWORD = config.PASSWORD +BASE_DIR = config.BASE_DIR app = Flask(__name__) -app.config['SECRET_KEY'] = 'tonieflix-super-secret-key' +app.config['SECRET_KEY'] = config.SECRET_KEY CORS(app, supports_credentials=True, allow_headers="*") @@ -672,4 +673,4 @@ def api_upload_to_tonie(): if __name__ == '__main__': - app.run(host='0.0.0.0', port=5005) \ No newline at end of file + app.run(host='0.0.0.0', port=5005) diff --git a/config.example.py b/config.example.py new file mode 100644 index 0000000..348adab --- /dev/null +++ b/config.example.py @@ -0,0 +1,3 @@ +SECRET_KEY = 'super-secret-key' +BASE_DIR = '/mnt/Hoerbuecher/' +PASSWORD = 'supergeheimespasswort'