No need to discover panel in Site class
Panel discovery is done by the _audodiscover() method in
the Dashboard class later
Closes-Bug:
@@ -879,16 +879,15 @@ class Site(Registry, HorizonComponent):
raise ImproperlyConfigured('You must set a '
'"_registerable_class" property '
'in order to use autodiscovery.')
- # Discover both dashboards and panels, in that order
- for mod_name in ('dashboard', 'panel'):
+ # Discover dashboards
for app in settings.INSTALLED_APPS:
mod = import_module(app)
try:
before_import_registry = copy.copy(self._registry)
- import_module('%s.%s' % (app, mod_name))
+ import_module('%s.dashboard' % app)
except Exception:
self._registry = before_import_registry
- if module_has_submodule(mod, mod_name):
+ if module_has_submodule(mod, 'dashboard'):
raise
def _load_panel_customization(self):
