1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +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

@@ -5,7 +5,7 @@ from functools import partial
from importlib import import_module
from inspect import getargspec, getcallargs
from django.apps import app_cache
from django.apps import apps
from django.conf import settings
from django.template.context import (BaseContext, Context, RequestContext, # NOQA: imported for backwards compatibility
ContextPopException)
@@ -1306,7 +1306,7 @@ def get_templatetags_modules():
templatetags_modules_candidates = ['django.templatetags']
templatetags_modules_candidates += ['%s.templatetags' % app_config.name
for app_config in app_cache.get_app_configs()]
for app_config in apps.get_app_configs()]
for templatetag_module in templatetags_modules_candidates:
try:
import_module(templatetag_module)

View File

@@ -6,7 +6,7 @@ packages.
import os
import sys
from django.apps import app_cache
from django.apps import apps
from django.conf import settings
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
@@ -17,7 +17,7 @@ from django.utils import six
if six.PY2:
fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
app_template_dirs = []
for app_config in app_cache.get_app_configs():
for app_config in apps.get_app_configs():
template_dir = os.path.join(app_config.path, 'templates')
if os.path.isdir(template_dir):
if six.PY2:

View File

@@ -6,7 +6,7 @@ try:
except ImportError:
resource_string = None
from django.apps import app_cache
from django.apps import apps
from django.conf import settings
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
@@ -24,7 +24,7 @@ class Loader(BaseLoader):
"""
if resource_string is not None:
pkg_name = 'templates/' + template_name
for app_config in app_cache.get_app_configs():
for app_config in apps.get_app_configs():
try:
resource = resource_string(app_config.name, pkg_name)
except Exception: