Skip to main content

Django Debug Toolbar for GraphiQL IDE

Project description

Disclaimer

This package was made up from a urgent update of the original package Django GraphiQL Debug Toolbar from “pip install django-graphiql-debug-toolbar”. As original package had an unresolved bug regarding graphQl request been executing twice, this package propose is to provide a temporal pip package with the update fix as I depend on a pip working package to handle versions on one of my proyect. As soon as the original package Django GraphiQL Debug Toolbar solve that bug, this package will be deleted.

Django GraphiQL Debug Toolbar

Pypi Build Status Codecov

Django Debug Toolbar for GraphiQL IDE

https://user-images.githubusercontent.com/5514990/36340937-1937ee68-1419-11e8-8477-40622e98c312.gif

Dependencies

  • Python ≥ 3.4

  • Django ≥ 1.11

Installation

Install last stable version from Pypi.

pip install fingo-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

File details

Details for the file fingo-django-graphiql-debug-toolbar-0.1.5.tar.gz.

File metadata

  • Download URL: fingo-django-graphiql-debug-toolbar-0.1.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.9

File hashes

Hashes for fingo-django-graphiql-debug-toolbar-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c0d8a8cfd8f141696eb8497213368d361e593d9ccc43c0682eb4418a41f9c598
MD5 2c0686f2b3bc6c061176bc3e5cdaae5e
BLAKE2b-256 6139b2e852d97bb4b11c3a307a6e1b50729b6cc34d49577b7b9384b3baa40c50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page