Removed the collision with django-debug-toolbar tracking. #108

This commit is contained in:
Syrus Akbary 2016-02-04 14:23:59 -08:00
parent 457ecbe491
commit c5b15cec2f

View File

@ -33,19 +33,19 @@ recording = state.recording # export function
def wrap_cursor(connection, panel):
if not hasattr(connection, '_djdt_cursor'):
connection._djdt_cursor = connection.cursor
if not hasattr(connection, '_graphene_cursor'):
connection._graphene_cursor = connection.cursor
def cursor():
return state.Wrapper(connection._djdt_cursor(), connection, panel)
return state.Wrapper(connection._graphene_cursor(), connection, panel)
connection.cursor = cursor
return cursor
def unwrap_cursor(connection):
if hasattr(connection, '_djdt_cursor'):
del connection._djdt_cursor
if hasattr(connection, '_graphene_cursor'):
del connection._graphene_cursor
del connection.cursor