Skip to content

Commit c6f35b6

Browse files
committed
Added example how to add MongoDebugPanel
1 parent bd7ff7e commit c6f35b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ If you use the Flask-DebugToolbar you can add
204204
`'flask.ext.mongoengine.panels.MongoDebugPanel'` to the `DEBUG_TB_PANELS` config
205205
list and then it will automatically track your queries.
206206

207+
from flask import Flask
208+
from flask_debugtoolbar import DebugToolbarExtension
209+
210+
app = Flask(__name__)
211+
app.config['DEBUG_TB_PANELS'] = ['flask.ext.mongoengine.panels.MongoDebugPanel']
212+
db = MongoEngine(app)
213+
toolbar = DebugToolbarExtension(app)
214+
215+
216+
207217
Upgrading
208218
=========
209219

0 commit comments

Comments
 (0)