Flask SQLAlchemy display queries for debug

后端 未结 8 1217
感情败类
感情败类 2021-02-03 17:21

I am developing an app with flask and SQL Alchemy. I need to display the queries executed to generate a page alongside the time each query took for debugging

What\'s the

8条回答
  •  生来不讨喜
    2021-02-03 18:05

    If you're using the Flask-SQLAlchemy extension and don't want to bother with create_engine, you can set the configuration key SQLALCHEMY_ECHO=True.

    http://flask-sqlalchemy.pocoo.org/2.1/config/

提交回复
热议问题