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
Django Debug Toolbar is not presented after PUT request DRF #1743
Comments
That's interesting. I had the suspicion that maybe the toolbar JS fails since it hooks into XHR/fetch but it doesn't look as if a failure should hide the toolbar. |
running |
|
Hi folks. Would either of you be able to create a reproducible example for us to investigate? |
https://www.loom.com/share/b18a95dc61d647329a9232b0eddd07e9?sid=b3560fd2-7dd4-4dc6-a2ed-d1492ccf7ec4 |
Thank you @HarshGuptaShorthillsAI. I didn't doubt that it was happening. What I'm looking for is a minimal django project that reproduces this so I can look into why exactly this is happening on my local machine. There could be a slight difference in how you have the project setup versus what I would do. That could lead to the difference in results. The toolbar has an example project if you want to fork that and start from there. |
Surprisingly did not have to do anything special to reproduce it, just latest django, drf (+basic api), djdt. https://github.com/MaziyarMK/djdt_bug Lemme know if that does reproduce on your side as well. |
DRF 3.15 now includes a fix to address this issue. |
DjDT disappears after making either PUT or PATCH requests in the browsable DRF API. For GET and POST requests everything works fine. After a single PUT request debug toolbar disappears. And after a single GET request, it shows back.
If open dev tools, djdt keeps being presented inside of HTML.
The server is running on the localhost with
DEBUG=True
.I followed the official installation tutorial:
"127.0.0.1"
are listed inINTERNAL_IPS
'debug_toolbar.middleware.DebugToolbarMiddleware'
listed as high as possible. Higher only'corsheaders.middleware.CorsMiddleware'
and'django.middleware.security.SecurityMiddleware'
Has anyone met with this?
The text was updated successfully, but these errors were encountered: