From 19e973b60b07578cb71a9334a737053136dc6bbb Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 15 Feb 2022 11:28:51 -0500 Subject: initialize database in app --- stackbin.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stackbin.py') diff --git a/stackbin.py b/stackbin.py index f4059f0..ad5b047 100755 --- a/stackbin.py +++ b/stackbin.py @@ -302,5 +302,7 @@ def get_proxied_path(): app.wsgi_app = ProxyFix(app.wsgi_app,x_for=pl,x_host=pl,x_port=pl,x_prefix=pl,x_proto=pl) return redirect(url_for('new_paste')) +# Initialize the database if it does not already exist +db.create_all() if __name__ == "__main__": app.run() -- cgit