diff options
| author | Aymeric Augustin | 2013-12-14 12:47:28 -0800 |
|---|---|---|
| committer | Aymeric Augustin | 2013-12-14 12:47:28 -0800 |
| commit | dbed3e7c72f930c285f17206879f6bd1d46f67a1 (patch) | |
| tree | 317b063328fab25298262db1e7ae81ad50282a4a /debug_toolbar/toolbar.py | |
| parent | 59e4931d5880ed24cb49734e81c7ed538c98fa45 (diff) | |
| parent | bdbe57d6e13241f852860336f55bca0d88bd4384 (diff) | |
| download | django-debug-toolbar-dbed3e7c72f930c285f17206879f6bd1d46f67a1.tar.bz2 | |
Merge pull request #494 from django-debug-toolbar/staticfiles
Added staticfiles panel class.
Diffstat (limited to 'debug_toolbar/toolbar.py')
| -rw-r--r-- | debug_toolbar/toolbar.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/debug_toolbar/toolbar.py b/debug_toolbar/toolbar.py index b08efeb..ec840dd 100644 --- a/debug_toolbar/toolbar.py +++ b/debug_toolbar/toolbar.py @@ -11,8 +11,11 @@ from django.conf.urls import patterns, url from django.core.exceptions import ImproperlyConfigured from django.template import TemplateSyntaxError from django.template.loader import render_to_string -from django.utils.datastructures import SortedDict from django.utils.importlib import import_module +try: + from collections import OrderedDict +except ImportError: + from django.utils.datastructures import SortedDict as OrderedDict from debug_toolbar import settings as dt_settings @@ -22,7 +25,7 @@ class DebugToolbar(object): def __init__(self, request): self.request = request self.config = dt_settings.CONFIG.copy() - self._panels = SortedDict() + self._panels = OrderedDict() for panel_class in self.get_panel_classes(): panel_instance = panel_class(self) self._panels[panel_instance.panel_id] = panel_instance @@ -73,7 +76,7 @@ class DebugToolbar(object): # Handle storing toolbars in memory and fetching them later on - _store = SortedDict() + _store = OrderedDict() def should_render_panels(self): render_panels = self.config['RENDER_PANELS'] |
