I got confused by the official doc of django-debug-toolbar, http://django-debug-toolbar.readthedocs.org/en/1.3.2/installation.html
According to the Explicit setup
, I did below steps:
- pip install django-debug-toolbar
- set
static
folder as Django debug page layout is broken - add
debug_toolbar
to INSTALLED_APPS DEBUG
is True in settings.pydebug_toolbar.middleware.DebugToolbarMiddleware
added in settings.pyDEBUG_TOOLBAR_PATCH_SETTINGS = False
added in settings.pyINTERNAL_IPS = ('127.0.0.1', 'xxx.xx.xxx',)
added in settings.pyif settings.DEBUG: ...
added in urls.py as official doc- My json data is showing in Django REST framework template, so I think there is no
</body>
issue for this problem.
And the toolbar didn't show up, then I found below notes from the official doc
The automatic setup relies on debug_toolbar.models being imported when the server starts. Django doesn’t provide a better hook to execute code during the start-up sequence. This works with manage.py runserver because it validates models before serving requests.
I didn't import debug_toolbar.models
in above steps, do I need to do it? and where?
` and `
– Rahul Gupta Aug 30 '15 at 11:11and
tag.
– Rahul Gupta Aug 30 '15 at 11:14