mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
@@ -344,11 +344,9 @@ class AppCommand(BaseCommand):
|
||||
from django.apps import apps
|
||||
if not app_labels:
|
||||
raise CommandError("Enter at least one application label.")
|
||||
# Populate models and don't use only_with_models_module=True when
|
||||
# calling get_app_config() to tell apart missing apps from apps
|
||||
# without a model module -- which can't be supported with the legacy
|
||||
# API since it passes the models module to handle_app().
|
||||
apps.populate_models()
|
||||
# Don't use only_with_models_module=True in get_app_config() to tell
|
||||
# apart missing apps from apps without a model module -- which can't
|
||||
# be supported with the legacy API since it passes the models module.
|
||||
try:
|
||||
app_configs = [apps.get_app_config(app_label) for app_label in app_labels]
|
||||
except (LookupError, ImportError) as e:
|
||||
|
||||
Reference in New Issue
Block a user