-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UserWarning: Could not insert debug toolbar. </body> tag not found in response. #125
Comments
I meet the same problem! Hope the team can deal with it! |
Facing the same issue |
same here. Just a warning in version |
I suspect all of you are trying to use debug toolbar with JSON based responses, not HTML based responses, yes? Debug toolbar works only when rendering html pages from flask. |
Note to self: Add DEBUG-level logging of the response, that way it'd be easy to see what's actually getting returned... |
I'm using Htmx library which uses AJAX that returns html in the background which it then uses to updates the DOM. It's not really a problem but would it be possible to add a decorator or config option to list endpoints for debugtoolbar to ignore? |
HTMX user here as well. FWIW, django_debugtoolbar offers a mechanism to turn OFF debugToolbar on specified routes (for example, HTMX calls that are still returning clean HTML, just not total pages) using the Minimally, would still be nice to be able to mute the "body tag not found" warning! |
Why was #125 marked as a duplicate of this? #159 (comment) The requests seem to be different. Unless you're looking at this? #125 (comment) Either way, the ability to toggle per endpoint is such a critical feature. |
My impression is that we'd consider them duplicates because they're two requests (albeit for different motivations or use cases) that end up asking for the same thing - a way to turn off the toolbar on specific routes. While they may be different, I'd argue that they have the same solution, so tracking them together makes sense. |
Hi Team,
I am using Flask(0.12.2) with Angular(v6) as front-end framework. I did the setup of the toolbar as described in the documentation. However, the toolbar is not showing up when I load the app. I am getting following warning:
UserWarning: Could not insert debug toolbar. </body> tag not found in response. warnings.warn('Could not insert debug toolbar.'
Does the non-appearance of the debug toolbar has to do with the front-end framework I am using (Angular)? Let me know if you need more info here. Thanks!
The text was updated successfully, but these errors were encountered: