def cursor(self):
    from django.conf import settings
    cursor = self._cursor()
    if settings.DEBUG:
        return self.make_debug_cursor(cursor)
    return cursor
def cursor(self):
    from django.conf import settings
    cursor = self._cursor()
    if settings.DEBUG:
        return self.make_debug_cursor(cursor)
    return cursor