1 from philo.contrib.gilbert.sites import GilbertSite, site
6 from django.conf import settings
7 from django.utils.importlib import import_module
8 from django.utils.module_loading import module_has_submodule
10 for app in settings.INSTALLED_APPS:
11 mod = import_module(app)
13 before_import_model_registry = copy.copy(site.model_registry)
14 before_import_plugin_registry = copy.copy(site.plugin_registry)
15 import_module('%s.gilbert' % app)
17 site.model_registry = before_import_model_registry
18 site.plugin_registry = before_import_plugin_registry
20 if module_has_submodule(mod, 'gilbert'):