def cursor(self): if (self.use_debug_cursor or (self.use_debug_cursor is None and settings.DEBUG)): cursor = self.make_debug_cursor(self._cursor()) else: cursor = util.CursorWrapper(self._cursor(), self) return cursor
def cursor(self): self.validate_thread_sharing() if (self.use_debug_cursor or (self.use_debug_cursor is None and settings.DEBUG)): cursor = self.make_debug_cursor(self._cursor()) else: cursor = util.CursorWrapper(self._cursor(), self) return cursor
def cursor(self): """ Creates a cursor, opening a connection if necessary. """ self.validate_thread_sharing() if (self.use_debug_cursor or (self.use_debug_cursor is None and settings.DEBUG)): cursor = self.make_debug_cursor(self._cursor()) else: cursor = util.CursorWrapper(self._cursor(), self) return cursor