django-debug-toolbar
django-debug-toolbar copied to clipboard
'debug_toolbar' loads in small iframe
The issues I have are:
- The
debug_toolbar
is shown outside the iFrame AND within. So, I have two of them. The iFrame is very small, so the toolbar does not make any sense in there. - The outer
debug_toolbar
contains no SQL queries, it just says:No SQL queries were recorded during this request.
. Also no cache.. - The inner one shows the SQLs and caches correctly.
I could hide the inner one, but then I am missing the SQLs.
What can I do? Are there any options?
It seems like the outer toolbar is missing the backends.
I have included debug_toolbar
to the INSTALLED_APPS
.
And I tried to add 'debug_toolbar.middleware.DebugToolbarMiddleware',
to every possible location in MIDDLEWARE
.
I'm assuming you have an application built in which the front-end loads an iframe where both the parent and the iframe are using the same django application for the backend. If that's true, I can think of two options (there are likely more):
- Start two
runserver
processes on different ports, have the parent and iframe hit different processes. This should allow you to use the toolbar for both. - Manipulate the config setting
SHOW_TOOLBAR_CALLBACK
so that it only shows the toolbar for the iframe portion or the parent window portion depending on your needs.
I agree with Tim's suggestions. There isn't a bug in Debug Toolbar, but a need for further configuration to meet your unique needs. I'm open to contributions that add docs that provide examples of how to work with iframes. But beyond that, I don't think there is anything to fix.
Closing due to lack of response.