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

Deprecated get_app().

This commit is contained in:
Aymeric Augustin
2013-12-14 11:11:52 +01:00
parent 2732edc5f2
commit 69039becde
13 changed files with 55 additions and 62 deletions

View File

@@ -11,7 +11,6 @@ import sys
from optparse import make_option, OptionParser
import django
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color import color_style, no_style
from django.utils.encoding import force_str
from django.utils.six import StringIO
@@ -346,8 +345,8 @@ class AppCommand(BaseCommand):
if not app_labels:
raise CommandError('Enter at least one appname.')
try:
app_list = [app_cache.get_app(app_label) for app_label in app_labels]
except (ImproperlyConfigured, ImportError) as e:
app_list = [app_cache.get_app_config(app_label).models_module 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 = []
for app in app_list: