Ticket #5415: 5415.diff
File 5415.diff, 1.2 KB (added by , 17 years ago) |
---|
-
django/db/backends/util.py
1 1 import datetime 2 2 import md5 3 3 from time import time 4 from django.core import signals 5 from django.dispatch import dispatcher 4 6 from django.utils.encoding import smart_unicode, force_unicode 5 7 6 8 try: … … 15 17 16 18 def execute(self, sql, params=()): 17 19 start = time() 20 dispatcher.send(signal=signals.dbapi_sql_execute, sender=self, sql=sql, params=params) 18 21 try: 19 22 return self.cursor.execute(sql, params) 20 23 finally: … … 26 29 27 30 def executemany(self, sql, param_list): 28 31 start = time() 32 dispatcher.send(signal=signals.dbapi_sql_execute, sender=self, sql=sql, params=params_list) 29 33 try: 30 34 return self.cursor.executemany(sql, param_list) 31 35 finally: -
django/core/signals.py
1 1 request_started = object() 2 2 request_finished = object() 3 3 got_request_exception = object() 4 dbapi_sql_execute = object()