Registry /
web-framework / django-graphiql-debug-toolbar
Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.915 runs
installs and imports cleanly · install 0.0s · import 0.000s · 76.2MB
glibcpy 3.10–3.915 runs
installs and imports cleanly · install 5.4s · import 0.000s · 77MB
76MB installed
● package 76MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DebugToolbarMiddleware
✓ from graphiql_debug_toolbar.middleware import DebugToolbarMiddleware
✗ from graphiql_debug_toolbar.middleware import DebugToolbarMiddleware
To quickly set up `django-graphiql-debug-toolbar`, first install it and `django-debug-toolbar`. Then, modify your Django project's `settings.py` by adding `debug_toolbar` and `graphiql_debug_toolbar` to `INSTALLED_APPS`. Crucially, replace the default `DebugToolbarMiddleware` with `graphiql_debug_toolbar.middleware.DebugToolbarMiddleware` in your `MIDDLEWARE` list. Ensure `DEBUG` is `True` and `INTERNAL_IPS` is configured. Finally, include the `debug_toolbar.urls` in your project's `urls.py`, typically conditional on `settings.DEBUG`.
# settings.py
import os
DEBUG = True # Must be True for the toolbar to show
INSTALLED_APPS = [
# ... other Django apps
'django.contrib.staticfiles',
'debug_toolbar',
'graphiql_debug_toolbar',
# 'graphene_django' if using Graphene,
# ...
]
MIDDLEWARE = [
# ... other middleware
'django.middleware.security.SecurityMiddleware',
'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',
# Ensure this comes after other middleware that might encode content
# and before any middleware that modifies the response too much.
# Replace the standard DebugToolbarMiddleware with the GraphiQL version
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
'graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
# ...
]
INTERNAL_IPS = [
'127.0.0.1',
# Add other internal IPs if you're developing in a container/VM
# '10.0.2.2', # For Android emulator if running Django in Docker
]
STATIC_URL = 'static/'
# urls.py (in your project's main urls.py)
from django.conf import settings
from django.urls import include, path
urlpatterns = [
# ... your other url patterns
]
if settings.DEBUG:
urlpatterns += [
path('__debug__/', include('debug_toolbar.urls')),
]
Debug
Known issues
breakingVersion 0.2.0 removed support for Django versions older than 2.3. Ensure your Django project is on version 2.3 or higher before upgrading to 0.2.0.fixUpgrade Django to version 2.3 or higher, or pin `django-graphiql-debug-toolbar` to version <0.2.0.
affects: 0.2.0 and later
gotchaThe toolbar requires `django-debug-toolbar` to be properly installed and configured first. Incompatibilities with `django-debug-toolbar` versions 4.4.6 or newer have been reported.fixVerify `django-debug-toolbar` is correctly installed and its basic functionality works. Check GitHub issues for known incompatibilities with specific `django-debug-toolbar` versions and consider pinning an older compatible version if issues arise.
affects: All versions, especially 0.2.0 with newer `django-debug-toolbar` versions.
gotchaThe `DebugToolbarMiddleware` must be placed correctly in your `MIDDLEWARE` list, ideally early but after any middleware that compresses content (like `GZipMiddleware`) and before any that might alter responses too heavily. Incorrect placement can prevent the toolbar from appearing or functioning.fixEnsure `graphiql_debug_toolbar.middleware.DebugToolbarMiddleware` is placed early in `MIDDLEWARE`, typically after Django's core middlewares but before any complex custom ones.
affects: All versions
gotchaThe Debug Toolbar will only display if `settings.DEBUG` is set to `True` and the request's IP address is included in `settings.INTERNAL_IPS`.fixSet `DEBUG = True` in your `settings.py` for development. Add your local IP address (e.g., '127.0.0.1') to `INTERNAL_IPS`. If running in Docker or a VM, ensure `INTERNAL_IPS` includes the appropriate host IP.
affects: All versions
Upgrade
Version history
0.2.0latest on PyPI · released Aug 28, 2021
Audit
Dependencies
DjangorequiredCore framework dependency; version 0.2.0 requires Django >=2.3.
django-debug-toolbarrequiredProvides the underlying debug toolbar functionality that this library extends.
graphene-djangooptionalTypically used in conjunction with GraphiQL for building GraphQL APIs in Django.