Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Print all bad apps passed to makemigrations, not just the first one.

  • Loading branch information...
commit 3f1f91f155c89d0be9f920bb88a2c32f652fa79b 1 parent 7970d97
@andrewgodwin andrewgodwin authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 django/core/management/commands/makemigrations.py
View
8 django/core/management/commands/makemigrations.py
@@ -28,12 +28,16 @@ def handle(self, *app_labels, **options):
# 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"])
Please sign in to comment.
Something went wrong with that request. Please try again.