예제 #1
0
파일: __init__.py 프로젝트: Myxir20/django
 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
예제 #2
0
 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
예제 #3
0
 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