Skip to content

Commit

Permalink
Add compatibility for py-django-debug-toolbar >= 4.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCLeduc committed Oct 7, 2024
1 parent 76f7d50 commit 3a62439
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions graphiql_debug_toolbar/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
from django.template.loader import render_to_string
from django.utils.encoding import force_str

from debug_toolbar.middleware import _HTML_TYPES
from graphene_django.views import GraphQLView

import debug_toolbar

if debug_toolbar.VERSION < "4.4.6":
from debug_toolbar.middleware import _HTML_TYPES
else:
from debug_toolbar.utils import _HTML_TYPES

from debug_toolbar.middleware import DebugToolbarMiddleware as BaseMiddleware
from debug_toolbar.toolbar import DebugToolbar
from graphene_django.views import GraphQLView

from .serializers import CallableJSONEncoder

Expand Down

0 comments on commit 3a62439

Please sign in to comment.