diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 20:02:55 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 20:02:55 +0100 |
| commit | 3f1f91f155c89d0be9f920bb88a2c32f652fa79b (patch) | |
| tree | 8424789c45742c94b2dc4b883f3b9fb6a2a24032 | |
| parent | 7970d97a708f0d2f4fbd654eaf785338ab04cc1e (diff) | |
Print all bad apps passed to makemigrations, not just the first one.
| -rw-r--r-- | django/core/management/commands/makemigrations.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py index e1a6d5e319..1296a14cdd 100644 --- a/django/core/management/commands/makemigrations.py +++ b/django/core/management/commands/makemigrations.py @@ -28,12 +28,16 @@ class Command(BaseCommand): # Make sure the app they asked for exists app_labels = set(app_labels) + bad_app_labels = set() for app_label in app_labels: try: cache.get_app(app_label) except ImproperlyConfigured: - self.stderr.write("The app you specified - '%s' - could not be found. Is it in INSTALLED_APPS?" % app_label) - sys.exit(2) + bad_app_labels.add(app_label) + if bad_app_labels: + for app_label in bad_app_labels: + self.stderr.write("App '%s' could not be found. Is it in INSTALLED_APPS?" % app_label) + sys.exit(2) # Load the current graph state loader = MigrationLoader(connections["default"]) |
