diff options
Diffstat (limited to 'debug_toolbar/panels/profiling.py')
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index 9683111..d07fd2a 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -163,7 +163,7 @@ class ProfilingDebugPanel(DebugPanel):                      self._unwrap_closure_and_profile(cell.cell_contents)      def process_view(self, request, view_func, view_args, view_kwargs): -        print "process_view", view_func +        __traceback_hide__ = True          self.profiler = cProfile.Profile()          args = (request,) + view_args          if DJ_PROFILE_USE_LINE_PROFILER: @@ -189,6 +189,9 @@ class ProfilingDebugPanel(DebugPanel):                      self.add_node(func_list, subfunc, max_depth, cum_time=cum_time)      def process_response(self, request, response): +        __traceback_hide__ = True +        if not hasattr(self, 'profiler'): +            return None          self.profiler.create_stats()          self.stats = DjangoDebugToolbarStats(self.profiler)          if DJ_PROFILE_USE_LINE_PROFILER: | 
