Django Debug Toolbar for GraphiQL IDE
Project description
Django Debug Toolbar for GraphiQL IDE
Dependencies
Python ≥ 3.4
Django ≥ 1.11
Installation
Install last stable version from Pypi.
pip install django-graphiql-debug-toolbar
See the documentation for further guidance on setting Django Debug Toolbar.
Add graphiql_debug_toolbar to your INSTALLED_APPS settings:
INSTALLED_APPS = [
...
'debug_toolbar',
'graphiql_debug_toolbar',
]
Replace the Django Debug Toolbar middleware with the GraphiQL Debug Toolbar one.
MIDDLEWARE = [
...
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
'graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
...
]
The Debug Toolbar is shown only if your IP is listed in the INTERNAL_IPS setting (you can change this logic with the SHOW_TOOLBAR_CALLBACK option).
INTERNAL_IPS = ['127.0.0.1', '...']
Dockerize INTERNAL_IPS
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS += [ip[:-1] + '1' for ip in ips]
Limitations
Panels rendering is not supported in multiprocess environment.
Credits to @jazzband / django-debug-toolbar.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-graphiql-debug-toolbar-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 946fba21418b3fd57e7e357d4cd110fb7881e08d3b7a0a8a00400fa2e75965f5 |
|
MD5 | 8bd94a56cf28cd3e6753e522412f2abf |
|
BLAKE2b-256 | aed923634b7e329db01a7f9b43dfd6212ec682a06f58b314f8384eb38e8f2e3a |