Flask SQLAlchemy display queries for debug

后端 未结 8 1216
感情败类
感情败类 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:06
    app.config['SQLALCHEMY_ECHO'] = True
    
    0 讨论(0)
  • 2021-02-03 18:08

    In addition to the answer by Cawb07, which solved it for me, be sure you have DEBUG_TB_INTERCEPT_REDIRECTS set to True when you are querying before redirects.

    0 讨论(0)
提交回复
热议问题