diff --git a/devserver/modules/sql.py b/devserver/modules/sql.py index 30b6871..a183c22 100644 --- a/devserver/modules/sql.py +++ b/devserver/modules/sql.py @@ -53,8 +53,11 @@ def truncate_sql(sql, aggregates=True): except ImportError: debug_toolbar = False import django - version = float('.'.join([str(x) for x in django.VERSION[:2]])) - if version >= 1.6: + #version = float('.'.join([str(x) for x in django.VERSION[:2]])) + #if version >= 1.6: + # Version comparison fix required after Django 1.10 + version = django.VERSION[0] * 100 + django.VERSION[1] + if version >= 106: DatabaseStatTracker = utils.CursorWrapper else: DatabaseStatTracker = utils.CursorDebugWrapper