From 79b899f5c0f3468d8b4e95d0adef57e1c62980e6 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Sep 26 2017 05:01:21 +0000 Subject: [PATCH 1/2] Suppress warnings from flask_sqlalchemy This patch prevents flask_sqlalchemy from printing these warnings. UserWarning: SQLALCHEMY_DATABASE_URI not set. Defaulting to "sqlite:///:memory:". 'SQLALCHEMY_DATABASE_URI not set. Defaulting to ' FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning. 'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and ' Signed-off-by: Chenxiong Qi --- diff --git a/freshmaker/__init__.py b/freshmaker/__init__.py index ca709c8..6537b42 100644 --- a/freshmaker/__init__.py +++ b/freshmaker/__init__.py @@ -35,9 +35,10 @@ from freshmaker.proxy import ReverseProxy app = Flask(__name__) app.wsgi_app = ReverseProxy(app.wsgi_app) +conf = init_config(app) + db = SQLAlchemy(app) -conf = init_config(app) init_logging(conf) log = getLogger(__name__) From 6ff4628275d3e6f36fbd686a86895566a69b23bf Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Sep 26 2017 05:04:22 +0000 Subject: [PATCH 2/2] Ignore freshmaker.db from git Signed-off-by: Chenxiong Qi --- diff --git a/.gitignore b/.gitignore index db3ceb2..6485a0b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /freshmaker.egg-info/ *swp tests/test_freshmaker.db +freshmaker.db