-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
No sql stacktrace #654
Comments
Try moving the debug toolbar further up the list of the middlewares. |
Have tried moving it to the very top. No change. Everything else seems to work perfectly fine. |
Any way to debug this further? |
Do you have any applications or libraries that alter the database connection? As a side note, it looks like you are half setup for the [Explicit Setup](DEBUG_TOOLBAR_PATCH_SETTINGS = False). You should set |
And to debug this further, I would say to disable any non-standard django middleware then try the page again. |
Setting the debug_toolbar_patch_settings to false seems to have worked. Thanks. Playing around with a few more of the settings.... |
Closing as it's working now. |
Just found that if you have 'debug_toolbar.middleware.DebugToolbarMiddleware', twice in MIDDLEWARE_CLASSES for whatever reason, the same thing happens (always No SQL queries were recorded during this request.) |
Having the middleware twice exactly the problem for me. |
None of what was mentioned here worked for me. I'm still getting the 0 SQL queries in the panel. I have this in my INSTALLED_APPS
And this in my middleware
|
@Mikebarson The |
you should select 'history' of panel, then select your endpoint (e.g. /persons/) with clicking on 'switch' button |
I've installed django debug toolbar and all the panels apart from the sql panel seem to work.
On opening the sql panel I get the messages:
SQL queries from 0 connections
No SQL queries were recorded during this request.
My settings.py:
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
#'silk.middleware.SilkyMiddleware',
'pagination.middleware.PaginationMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
Add the debug toolbar
if DEBUG:
DEBUG_TOOLBAR_PATCH_SETTINGS = True
ENABLE_STACKTRACES = True
INSTALLED_APPS += (
'debug_toolbar',
)
INTERNAL_IPS = ('10.0.2.2', '127.0.0.1', '0.0.0.0',)
Any ideas or any steps I can take to further debug this? Thanks. The only thing that is affected is the SQL stacktrace...
The text was updated successfully, but these errors were encountered: