working #6

Merged
Jan merged 4 commits from working into main 2024-10-02 13:23:44 +02:00
Showing only changes of commit 38e9c9f7ed - Show all commits

View File

@ -516,6 +516,17 @@ def export_all_tables():
return send_file("zip_exports/all_tables.zip", as_attachment=False, download_name="all_tables.zip") return send_file("zip_exports/all_tables.zip", as_attachment=False, download_name="all_tables.zip")
# export Database
@app.route("/export_db")
def export_db():
if not session.get("logged_in"):
return redirect("/login")
with ZipFile('zip_exports/db.zip', 'w') as zipf: #no compression, need to add zipfile.ZIP_DEFLATED for compression
zipdir('instance/', zipf)
return send_file("zip_exports/db.zip", as_attachment=False, download_name="db.zip")
# export CSV # export CSV
@app.route("/export_all_videos") @app.route("/export_all_videos")
def export_all_videos(): def export_all_videos():