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