1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Renamed AppCache to Apps.

Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
This commit is contained in:
Aymeric Augustin
2013-12-24 12:25:17 +01:00
parent e9e522a8e7
commit 1716b7ce5a
92 changed files with 491 additions and 487 deletions

View File

@@ -341,16 +341,16 @@ class AppCommand(BaseCommand):
args = '<appname appname ...>'
def handle(self, *app_labels, **options):
from django.apps import app_cache
from django.apps import apps
if not app_labels:
raise CommandError('Enter at least one appname.')
# 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().
app_cache.populate_models()
apps.populate_models()
try:
app_configs = [app_cache.get_app_config(app_label) for app_label in app_labels]
app_configs = [apps.get_app_config(app_label) for app_label in app_labels]
except (LookupError, ImportError) as e:
raise CommandError("%s. Are you sure your INSTALLED_APPS setting is correct?" % e)
output = []