diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index 049297b5aa6..6133e71c504 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -68,7 +68,7 @@ def get_commands(): if not settings.configured: return commands - for app_config in reversed(list(apps.get_app_configs())): + for app_config in reversed(apps.get_app_configs()): path = os.path.join(app_config.path, 'management') commands.update({name: app_config.name for name in find_commands(path)}) diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 7a6bc814068..97efd40c6d9 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -191,7 +191,7 @@ class DjangoTranslation(gettext_module.GNUTranslations): def _add_installed_apps_translations(self): """Merge translations from each installed app.""" try: - app_configs = reversed(list(apps.get_app_configs())) + app_configs = reversed(apps.get_app_configs()) except AppRegistryNotReady: raise AppRegistryNotReady( "The translation infrastructure cannot be initialized before the "