From f48039e3bad9e24a59a25ed5636b428e11784da9 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Tue, 12 Nov 2013 22:05:52 +0100 Subject: Move the logic to load panels inside the DebugToolbar class. This has the additional advantage of eliminating a side-effect that happened at import time unnecessarily. It justified refactoring the way we handle settings and defaults. --- debug_toolbar/models.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'debug_toolbar/models.py') diff --git a/debug_toolbar/models.py b/debug_toolbar/models.py index d39e7ec..a204b13 100644 --- a/debug_toolbar/models.py +++ b/debug_toolbar/models.py @@ -5,7 +5,6 @@ from django.conf.urls import include, patterns, url from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.importlib import import_module -from debug_toolbar.toolbar import load_panel_classes from debug_toolbar.middleware import DebugToolbarMiddleware @@ -59,7 +58,3 @@ if settings.DEBUG: patch_internal_ips() patch_middleware_classes() patch_root_urlconf() - - -if is_toolbar_middleware_installed(): - load_panel_classes() -- cgit v1.2.3