djdt-flamegraph
djdt-flamegraph copied to clipboard
Update djdt-flamegraph to work with newest django debug toolbar
Lifecycle methods changed on djdt 2.0 release, and scripts stopped executing as well. This change requires you to add djdt_flamegraph to INSTALLED_APPS.
Hey @aleksanb, we don't really use this tool internally any more so I don't have a good way to test the changes. Happy to merge this though. However, why was the script extracted to its own file? Also, if extra steps are required to make this work, could you update the readme? Cheers.
I installed this fork in my Django 2.2 project with django-debug-toolbar 2.2 and although the flamegraph tab now shows up in the toolbar, it is grayed out. My DEBUG_TOOLBAR_CONFIG.DISABLE_PANELS
= {}
, so I think it should be enabled. Is this a problem with this fork, or the base project?
I installed this fork in my Django 2.2 project with django-debug-toolbar 2.2 and although the flamegraph tab now shows up in the toolbar, it is grayed out. My
DEBUG_TOOLBAR_CONFIG.DISABLE_PANELS
={}
, so I think it should be enabled. Is this a problem with this fork, or the base project?
Hi.
A thing i see i forgot to mention here, is that we're running django debug toolbar from master, as when debugging why the script moving content to the iframe wasn't executing in the frontend, i found this notice in the changelogs for unreleased djdt 3.0: https://django-debug-toolbar.readthedocs.io/en/latest/changes.html#a1-2020-06-05
Loading panel content no longer executes the scripts elements embedded in the HTML. Third party panels that require JavaScript resources should now use the Panel.scripts property.
Assuming that perhaps this already had broken on earlier versions, i just as well wrote this patch with support for 3.0 instead.
Conclusion: It might not actually work against djdt < 3.0.0
@aleksanb I think it may work with djdt 2.2 - I upgraded to 3.0a1 and am seeing the same grayed out behavior
EDIT: Actually, turns out the styling of my site destroyed the checkbox I had to click to enable it. However, it appears blank - is this correct?
EDIT: Actually, turns out the styling of my site destroyed the checkbox I had to click to enable it. However, it appears blank - is this correct?
the iframe should be filled with an enormous svg, if the script loaded correctly. I'm afraid that means you'll have to bump to 3.0.
@blopker
Is there any chance of merging it? (this PR made flamegraph usable with django 3.2)