-
Notifications
You must be signed in to change notification settings - Fork 139
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
Explore the use of Django Debug Toolbar #2939
Milestone
Comments
FroggyFlox
added a commit
to FroggyFlox/rockstor-core
that referenced
this issue
Dec 18, 2024
Add django-debug-toolbar package to the optional `dev` dependency group Add `--dev` flag to build.sh to run `poetry install` with that flag Add DjDTB to settings.py Add DjDTB urls
With the configuration in FroggyFlox@3b9f8f2, we have:
Selecting the one related to the SharesListView (as selected in the screenshot above), and we can see that it made 23 SQL queries in 83 ms, with the details for each of these: |
FroggyFlox
added a commit
to FroggyFlox/rockstor-core
that referenced
this issue
Dec 24, 2024
FroggyFlox
added a commit
to FroggyFlox/rockstor-core
that referenced
this issue
Dec 24, 2024
FroggyFlox
added a commit
to FroggyFlox/rockstor-core
that referenced
this issue
Dec 24, 2024
Rely on the DJANGO_DEBUG env variable to set DEBUG boolean that will in turn decide the installation of the dev group dependencies (includes the Django debug toolbar) as the appearance of the toolbar in the UI. Leave commented (= unset) by default to keep the default build NOT in the dev mode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now that we're on a more modern version of Django, we can explore the use of niceties and tools to help various aspects of the developer experience. In the Django world, the Django Debug Toolbar is a very popular and highly-recommended tool to provide such enhanced experience. As the project puts it:
Behind this relatively simple description hides a rather powerful tool to catch and list a lot of information about DJango's operation when one visits a page. This is thus potentially very helpful in identifying slow and sub-optimal operations in Rockstor's backend operations. In particular, the ability to see all SQL queries done should be able to pinpoint unnecessary queries we may be doing and thus highlight bits we can speed up and simplify.
Main repository: https://github.com/django-commons/django-debug-toolbar
License: BSD-3-Clause (https://github.com/django-commons/django-debug-toolbar#BSD-3-Clause-1-ov-file)
Maintainers: Django-commons (https://github.com/django-commons)
Docs: https://django-debug-toolbar.readthedocs.io/en/stable/index.html
As mentioned above, this is a very very popular project that is currently very active.
Django 4.2 is the currently minimum version supported so we still fit.
I'm opening this issue so that we can explore in the open to what extent Django Debug Toolbar (DjDT) can help us and whether it is worth the setup. I'll also open a draft PR to better illustrate what would be needed to use it in Rockstor. Note that this is a developer tool only and should thus not be included in an rpm release.
The text was updated successfully, but these errors were encountered: