From: Max Value Date: Tue, 7 Apr 2026 21:17:53 +0000 (+0100) Subject: Added DB Download X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=b17c726ccaedeeb8236f59749c683c9ba3a78d87;p=delta-velorum Added DB Download --- diff --git a/director/__init__.py b/director/__init__.py index ab046d4..706cd5e 100644 --- a/director/__init__.py +++ b/director/__init__.py @@ -57,3 +57,8 @@ app.route("/admin/", methods=["get", "post"])(auth.login_requ @app.route("/script/", methods=["get"]) def script(filename): return send_from_directory(os.path.join(app.root_path, "build"), filename) + +@app.route("/db", methods=["get"]) +@auth.login_required +def download_db(): + return send_from_directory(f"{app.root_path}/../data", "main.db") diff --git a/director/templates/admin.html b/director/templates/admin.html index 4182c7d..4c62a4e 100644 --- a/director/templates/admin.html +++ b/director/templates/admin.html @@ -27,6 +27,15 @@ setupTrigger();

Admin

+ +
+ +
+
+ + +
+