Changes between Initial Version and Version 1 of Ticket #22688, comment 1


Ignore:
Timestamp:
Jun 4, 2014, 3:55:33 PM (10 years ago)
Author:
Claude Paroz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22688, comment 1

    initial v1  
    1 A possible fix: https://gist.github.com/claudep/82122f524b08385859ab
     1A possible fix:
     2{{{
     3diff --git a/django/apps/registry.py b/django/apps/registry.py
     4index 41095bd..6c89a69 100644
     5--- a/django/apps/registry.py
     6+++ b/django/apps/registry.py
     7@@ -109,7 +109,14 @@ class Apps(object):
     8             self.ready = True
     9 
     10             for app_config in self.get_app_configs():
     11-                app_config.ready()
     12+                if not self.has_been_loaded(app_config.label):
     13+                    app_config.ready()
     14+
     15+    def has_been_loaded(self, app_label):
     16+        for stored in self.stored_app_configs:
     17+            if app_label in stored:
     18+                return True
     19+        return False
     20 
     21     def check_ready(self):
     22         """
     23}}}
Back to Top