Changes between Version 2 and Version 3 of PageStatsMiddleware
- Timestamp:
- Sep 16, 2007, 12:03:26 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PageStatsMiddleware
v2 v3 24 24 n = len(connection.queries) 25 25 26 # set this back so exceptions are properly handled27 debug = settings.DEBUG28 29 26 # time the view 30 27 start = time() 31 28 response = view_func(request, *view_args, **view_kwargs) 32 29 totTime = time() - start 33 34 # and once more, to get queries35 settings.DEBUG = True36 30 37 31 # compute the db time for the queries just run … … 82 76 <!-- STATS: Total: %(totTime).2f Python: %(pyTime).2f DB: %(dbTime).2f Queries: %(queries)d --> 83 77 }}} 78 79 Warning: This code will make exceptions and 404 errors visible regardless of your DEBUG setting, so don't use it on production servers.