diff options
| author | David Cramer | 2011-04-22 13:07:41 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-04-22 13:07:41 -0700 | 
| commit | 38019ea2f5222ac97a7c5b67074a8a3b2ecf1ba0 (patch) | |
| tree | 930b2513d4a6f76e17f4d95a91cbd1272ca87446 | |
| parent | bed167f9f6784ca18196a695cf62bf81f57a80cd (diff) | |
| download | django-debug-toolbar-38019ea2f5222ac97a7c5b67074a8a3b2ecf1ba0.tar.bz2 | |
Kill off requirement of PROJECT_ROOT and clean up lint violations in profiling panel
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 10 | ||||
| -rw-r--r-- | example/example.db | bin | 55296 -> 55296 bytes | |||
| -rw-r--r-- | example/settings.py | 13 | 
3 files changed, 14 insertions, 9 deletions
| diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index af7137f..465a0a3 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -1,16 +1,10 @@ -import django -from django.conf import settings  from django.template.loader import render_to_string  from django.utils.translation import ugettext_lazy as _  from django.utils.safestring import mark_safe -import debug_toolbar  from debug_toolbar.panels import DebugPanel -import sys  import cProfile -from pstats import Stats, f8, func_std_string -from cStringIO import StringIO -from django.conf import settings +from pstats import Stats  from colorsys import hsv_to_rgb  class DjangoDebugToolbarStats(Stats): @@ -62,8 +56,6 @@ class FunctionCall(object):                  return name          else:              file_name, line_num, method = self.func -            if file_name.startswith(settings.PROJECT_ROOT): -                file_name='PROJECT' + file_name[len(settings.PROJECT_ROOT):]              idx = file_name.find('/site-packages/')              if idx > -1:                  file_name=file_name[idx+14:] diff --git a/example/example.db b/example/example.dbBinary files differ index 7603a2d..ae455e3 100644 --- a/example/example.db +++ b/example/example.db diff --git a/example/settings.py b/example/settings.py index 06e153d..11b0117 100644 --- a/example/settings.py +++ b/example/settings.py @@ -32,3 +32,16 @@ TEMPLATE_CONTEXT_PROCESSORS = (  )  TEMPLATE_DEBUG = DEBUG  TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates')) +DEBUG_TOOLBAR_PANELS = ( +    'debug_toolbar.panels.version.VersionDebugPanel', +    'debug_toolbar.panels.timer.TimerDebugPanel', +    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', +    'debug_toolbar.panels.headers.HeaderDebugPanel', +    'debug_toolbar.panels.profiling.ProfilingDebugPanel', +    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', +    'debug_toolbar.panels.sql.SQLDebugPanel', +    'debug_toolbar.panels.template.TemplateDebugPanel', +    #'debug_toolbar.panels.cache.CacheDebugPanel', +    'debug_toolbar.panels.signals.SignalDebugPanel', +    'debug_toolbar.panels.logger.LoggingPanel', +)
\ No newline at end of file | 
