Closed jabrouwer82 closed 9 years ago
Fixed by the following suggestions: http://piotr.banaszkiewicz.org/blog/2012/06/29/flask-sqlalchemy-init_app/ http://stackoverflow.com/questions/9692962/flask-sqlalchemy-import-context-issue in 8a54df40c44b962064b59e5312a8d9f8e634cb21
Traceback (most recent call last): File "initialize_db.py", line 5, in
db.drop_all()
File "/usr/local/lib/python3.4/dist-packages/flask_sqlalchemy/init.py", line 903, in drop_all
self._execute_for_all_tables(app, bind, 'drop_all')
File "/usr/local/lib/python3.4/dist-packages/flask_sqlalchemy/init.py", line 872, in _execute_for_all_tables
app = self.get_app(app)
File "/usr/local/lib/python3.4/dist-packages/flask_sqlalchemy/init.py", line 845, in get_app
raise RuntimeError('application not registered on db '
RuntimeError: application not registered on db instance and no application bound to current context