From 3bfb2d932fe8aaa6dbf5baa113a1f9eaeb3f692a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C4=ABna=20Lukjanovi=C4=8Da?= Date: Mon, 29 Apr 2024 06:31:37 +0000 Subject: [PATCH] Update main.py --- main.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main.py b/main.py index f9a7fd0..db3cb98 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,10 @@ from functools import wraps from datetime import datetime import os import logging +import csv +from sqlalchemy import create_engine, Table, MetaData + + app = Flask(__name__) app.secret_key = 'bebra' @@ -324,5 +328,14 @@ def downvote_comment(comment_id): def about(): return render_template("about.html") +""" +def recreate_database(): + if os.path.exists('Picture_Puzzle_web.db'): + os.remove('Picture_Puzzle_web.db') + with app.app_context(): + db.create_all() +""" + if __name__ == '__main__': + # recreate_database() app.run(debug=True) \ No newline at end of file