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_routers = copy.copy(site.model_routers)
17 before_import_core_router = copy.copy(site.core_router)
18 import_module('%s.gilbert' % app)
20 site.model_routers = before_import_model_routers
21 site.core_router = before_import_core_router
23 if module_has_submodule(mod, 'gilbert'):