django-debug-toolbar icon indicating copy to clipboard operation
django-debug-toolbar copied to clipboard

toolbar disappear

Open youjunxiaji opened this issue 7 months ago • 5 comments

I'm using ssh to remotely reach our company's server and ran python manager.py runserver 0.0.0.0:8000 and I set my ip address correctly in INTERNAL_IPS. When I access the drf page, get can appear, but it disappears when I post it. I need to run djdt.init() to come out

https://github.com/user-attachments/assets/35e2bfc4-4995-41ae-9c47-30baaf198c65

youjunxiaji avatar May 07 '25 08:05 youjunxiaji

Hi @youjunxiaji, we can't look into this unless we have enough information to reproduce it. Can you reproduce this locally? Or is this only on your remote machine? What versions of Django, DRF and the toolbar are you using?

tim-schilling avatar May 08 '25 12:05 tim-schilling

Hi @youjunxiaji, we can't look into this unless we have enough information to reproduce it. Can you reproduce this locally? Or is this only on your remote machine? What versions of Django, DRF and the toolbar are you using?您好,除非我们有足够的信息来复现此问题,否则我们无法进行调查。您能在本地复现此问题吗?还是只能在远程机器上复现?您使用的 Django、DRF 和工具栏是什么版本?

It doesn't work as long as I use SSH and DRF pages. When I use the admin interface when I am using the ssh remote, debug-tooltip still works. My django version is 5.0 and my DRF is 3.16.0 and django-debug-toolbar version is 5.0.1. Later I clone the project and run it on localhost and it has no problems.

youjunxiaji avatar May 11 '25 13:05 youjunxiaji

You could add some printing/logging to show_toolbar to see why it's failing to return True for your case. https://github.com/django-commons/django-debug-toolbar/blob/main/debug_toolbar/middleware.py#L23

tim-schilling avatar May 11 '25 13:05 tim-schilling

You can also consider adjusting the SHOW_TOOLBAR_CALLBACK setting: https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config

tim-schilling avatar May 11 '25 13:05 tim-schilling

You can also consider adjusting the SHOW_TOOLBAR_CALLBACK setting: https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config

thank u . i will try

youjunxiaji avatar May 11 '25 13:05 youjunxiaji

Closing as stale.

tim-schilling avatar Sep 20 '25 13:09 tim-schilling