from app import db
ImportError: cannot import name 'db'
如果你的view界面展示也在`__init__`下面, 那就把view展示相關的代碼移到最下面,因為python先執行view.py相關界面,而此時db還沒有創建,就會報這個錯誤
即app下的__init__.py中,db = SQLAlchemy() 位於blueprint之前
------參考http://epoch-cloud.com/index.php/2018/03/26/flask-from-app-import-db-importerror-cannot-import-name-db-的解決方案/