From 8b036801999916f53e006215d4aabdb85fa00083 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Mon, 3 Jun 2019 00:28:28 +0500 Subject: [PATCH] Minor changes * Make the app create tables on first run * Ignore the app configs with Git --- .gitignore | 3 +++ project_amber/app.py | 1 + 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 670c2bb..e844141 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ # VSCode settings .vscode +# App settings +config.json + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/project_amber/app.py b/project_amber/app.py index 3f7da32..5bad765 100644 --- a/project_amber/app.py +++ b/project_amber/app.py @@ -6,6 +6,7 @@ app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = config["database"] db = SQLAlchemy(app) +db.create_all() # create all tables on first run @app.route("/") def hello():