From: "Mart Raudsepp" <leio@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/grumpy:master commit in: backend/
Date: Mon, 28 Nov 2016 10:06:21 +0000 (UTC) [thread overview]
Message-ID: <1480327454.8e8de310d617629fba0887d7760bec6ea54dbf08.leio@gentoo> (raw)
commit: 8e8de310d617629fba0887d7760bec6ea54dbf08
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 10:03:15 2016 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 10:04:14 2016 +0000
URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=8e8de310
Turn off flask-sqlalchemy modification tracking to silence a warning and save resources
We shouldn't need SQLALCHEMY_TRACK_MODIFICATIONS, so just disable it as suggested to
avoid the warning and save these little resources. This is a flask-sqlalchemy specific
session event tracking thing; sqlalchemy itself provides its own mechanism for this
these days, and if we need something like that, we should probably use those, not
this flask-sqlalchemy thing.
backend/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/__init__.py b/backend/__init__.py
index 46a4007..4d78cd8 100644
--- a/backend/__init__.py
+++ b/backend/__init__.py
@@ -3,6 +3,7 @@ from flask_sqlalchemy import SQLAlchemy
app = Flask("frontend") # FIXME: Finish rearranging frontend/backend modules properly instead of pretending to be frontend in backend/__init__ because jinja templates are looked for from <what_is_passed_here>/templates
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///../backend/grumpy.db" # FIXME: configuration support; weird ../ because of claiming we are "frontend" to Flask and want to keep the path the same it was before for now. But this problem should go away with config, at least for postgres :)
+app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
from frontend import *
reply other threads:[~2016-11-28 10:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480327454.8e8de310d617629fba0887d7760bec6ea54dbf08.leio@gentoo \
--to=leio@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox