File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ def get_commands():
97
97
98
98
# Find the installed apps
99
99
try :
100
- from django .conf import settings
101
- apps = settings . INSTALLED_APPS
100
+ from django .core . apps import cache
101
+ apps = cache . installed_apps
102
102
except (AttributeError , EnvironmentError , ImportError ):
103
103
apps = []
104
104
@@ -419,6 +419,12 @@ def setup_environ(settings_mod, original_settings_path=None):
419
419
project_module = import_module (project_name )
420
420
sys .path .pop ()
421
421
422
+ # Initialize the appcache and look for errors
423
+ from django .core .apps import cache
424
+ for (app_name , error ) in cache .get_app_errors ().items ():
425
+ sys .stderr .write ("%s: %s" % (app_name , error ))
426
+ sys .exit (1 )
427
+
422
428
return project_directory
423
429
424
430
def execute_from_command_line (argv = None ):
You can’t perform that action at this time.
0 commit comments