summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-24 12:25:17 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-24 12:25:17 +0100
commit1716b7ce5a02b2a77188dfea2d41e25dfa58821c (patch)
treef3422c0d6725f45756a3b9deb32406d319b8a72e /django/utils
parente9e522a8e7455900a775678e5d6bc518a289b8d1 (diff)
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().
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/autoreload.py4
-rw-r--r--django/utils/module_loading.py4
-rw-r--r--django/utils/translation/trans_real.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index b7a889aa61..94c74e582a 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -36,7 +36,7 @@ import sys
import time
import traceback
-from django.apps import app_cache
+from django.apps import apps
from django.conf import settings
from django.core.signals import request_finished
try:
@@ -90,7 +90,7 @@ def gen_filenames():
basedirs = [os.path.join(os.path.dirname(os.path.dirname(__file__)),
'conf', 'locale'),
'locale']
- for app_config in reversed(list(app_cache.get_app_configs())):
+ for app_config in reversed(list(apps.get_app_configs())):
basedirs.append(os.path.join(app_config.path, 'locale'))
basedirs.extend(settings.LOCALE_PATHS)
basedirs = [os.path.abspath(basedir) for basedir in basedirs
diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py
index c7826be5e5..1ed7d93e31 100644
--- a/django/utils/module_loading.py
+++ b/django/utils/module_loading.py
@@ -58,10 +58,10 @@ def autodiscover_modules(*args, **kwargs):
registry. This register_to object must have a _registry instance variable
to access it.
"""
- from django.apps import app_cache
+ from django.apps import apps
register_to = kwargs.get('register_to')
- for app_config in app_cache.get_app_configs():
+ for app_config in apps.get_app_configs():
# Attempt to import the app's module.
try:
if register_to:
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 1eced98d31..29c133006e 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -10,7 +10,7 @@ import gettext as gettext_module
from threading import local
import warnings
-from django.apps import app_cache
+from django.apps import apps
from django.dispatch import receiver
from django.test.signals import setting_changed
from django.utils.encoding import force_str, force_text
@@ -179,7 +179,7 @@ def translation(language):
res.merge(t)
return res
- for app_config in reversed(list(app_cache.get_app_configs())):
+ for app_config in reversed(list(apps.get_app_configs())):
apppath = os.path.join(app_config.path, 'locale')
if os.path.isdir(apppath):
res = _merge(apppath)