From b5779f798ca5ef30a000af726921db43b33291a6 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 6 May 2021 09:17:13 +0300 Subject: wqflask: database: Replace one-line function with it's body * wqflask/wqflask/database.py (init_db): Remove it. --- wqflask/wqflask/database.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py index 38c37d2c..11f8d287 100644 --- a/wqflask/wqflask/database.py +++ b/wqflask/wqflask/database.py @@ -14,9 +14,5 @@ db_session = scoped_session(sessionmaker(autocommit=False, Base = declarative_base() Base.query = db_session.query_property() - -def init_db(): - Base.metadata.create_all(bind=engine) - - -init_db() +# Initialise the db +Base.metadata.create_all(bind=engine) -- cgit v1.2.3