Print all bad apps passed to makemigrations, not just the first one.
This commit is contained in:
parent
7970d97a70
commit
3f1f91f155
|
@ -28,12 +28,16 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
# Make sure the app they asked for exists
|
# Make sure the app they asked for exists
|
||||||
app_labels = set(app_labels)
|
app_labels = set(app_labels)
|
||||||
|
bad_app_labels = set()
|
||||||
for app_label in app_labels:
|
for app_label in app_labels:
|
||||||
try:
|
try:
|
||||||
cache.get_app(app_label)
|
cache.get_app(app_label)
|
||||||
except ImproperlyConfigured:
|
except ImproperlyConfigured:
|
||||||
self.stderr.write("The app you specified - '%s' - could not be found. Is it in INSTALLED_APPS?" % app_label)
|
bad_app_labels.add(app_label)
|
||||||
sys.exit(2)
|
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
|
# Load the current graph state
|
||||||
loader = MigrationLoader(connections["default"])
|
loader = MigrationLoader(connections["default"])
|
||||||
|
|
Loading…
Reference in New Issue