Changes between Version 1 and Version 2 of PageStatsMiddleware


Ignore:
Timestamp:
Sep 1, 2007, 2:05:26 PM (17 years ago)
Author:
Stavros Korokithakis
Comment:

Fixed debug bug

Legend:

Unmodified
Added
Removed
Modified
  • PageStatsMiddleware

    v1 v2  
    2424        n = len(connection.queries)
    2525
     26        # set this back so exceptions are properly handled
     27        debug = settings.DEBUG
     28
    2629        # time the view
    2730        start = time()
    2831        response = view_func(request, *view_args, **view_kwargs)
    2932        totTime = time() - start
     33
     34        # and once more, to get queries
     35        settings.DEBUG = True
    3036
    3137        # compute the db time for the queries just run
     
    4046        pyTime = totTime - dbTime
    4147
    42         # restore debugging setting
     48        # restore debugging setting again
    4349        settings.DEBUG = debug
    4450
Back to Top