@@ -0,0 +1,950 @@
+from uliweb import Middleware%0Afrom uliweb.orm import begin_sql_monitor, close_sql_monitor%0A%0Aclass SQLMonitorMiddle(Middleware):%0A    ORDER = 90%0A    %0A    def process_request(self, request):%0A        from uliweb import settings%0A%0A        if 'sqlmonitor' in request.GET or settings.ORM.SQL_MONITOR:%0A            self.monitor = begin_sql_monitor(settings.ORM.get('SQL_MONITOR_LENGTH', 70), record_details=False)%0A%0A    def process_response(self, request, response):%0A        from uliweb import settings%0A        %0A        if 'sqlmonitor' in request.GET or settings.ORM.SQL_MONITOR:%0A            self.monitor.print_(request.path)%0A            close_sql_monitor(self.monitor)%0A        return response%0A            %0A    def process_exception(self, request, exception):%0A        from uliweb import settings%0A        %0A        if 'sqlmonitor' in request.GET or settings.ORM.SQL_MONITOR:%0A            self.monitor.print_(request.path)%0A            close_sql_monitor(self.monitor)

add middle_sqlmonitor.py