mirror of
https://github.com/pallets-eco/flask-debugtoolbar.git
synced 2025-12-31 02:29:33 -06:00
Explicitly disable SQLALCHEMY_TRACK_MODIFICATIONS
This silences deprecation warnings. Background: https://stackoverflow.com/a/33790196/770425 Note: This code can be removed once `flask_sqlalchemy` 3.0 ships, or any release that includes https://github.com/pallets/flask-sqlalchemy/pull/727.
This commit is contained in:
@@ -17,6 +17,10 @@ app.config['DEBUG_TB_INTERCEPT_REDIRECTS'] = True
|
||||
#app.config['DEBUG_TB_HOSTS'] = ('127.0.0.1', '::1' )
|
||||
app.config['SECRET_KEY'] = 'asd'
|
||||
app.config['DEBUG'] = True
|
||||
|
||||
# TODO: This can be removed once flask_sqlalchemy 3.0 ships
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
|
||||
db = SQLAlchemy(app)
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ app = Flask('basic_app')
|
||||
app.debug = True
|
||||
app.config['SECRET_KEY'] = 'abc123'
|
||||
|
||||
# TODO: This can be removed once flask_sqlalchemy 3.0 ships
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||
|
||||
# make sure these are printable in the config panel
|
||||
app.config['BYTES_VALUE'] = b'\x00'
|
||||
app.config['UNICODE_VALUE'] = u'\uffff'
|
||||
|
||||
Reference in New Issue
Block a user