From 137a3d7c77e235e6752b00fe9901a700b68fcef2 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 23 Dec 2013 22:21:23 +0100 Subject: [PATCH] Avoided loading repeatedly the same models module. --- django/apps/cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/apps/cache.py b/django/apps/cache.py index bd412f1192..3a95ea1306 100644 --- a/django/apps/cache.py +++ b/django/apps/cache.py @@ -113,6 +113,9 @@ class AppCache(object): for app_config in self.app_configs.values(): + if app_config.models is not None: + continue + try: all_models = self.all_models[app_config.label] app_config.import_models(all_models)