Brought comments in sync with the code in BaseAppCache.

This commit is contained in:
Aymeric Augustin 2013-12-11 23:16:06 +01:00
parent 5cd6477fd6
commit 9c5f59f489
1 changed files with 5 additions and 6 deletions

View File

@ -55,6 +55,10 @@ def _initialize():
# Pending lookups for lazy relations # Pending lookups for lazy relations
pending_lookups={}, pending_lookups={},
# List of app_labels that allows restricting the set of apps.
# Used by TransactionTestCase.available_apps for performance reasons.
available_apps=None,
# -- Everything below here is only used when populating the cache -- # -- Everything below here is only used when populating the cache --
loads_installed=True, loads_installed=True,
loaded=False, loaded=False,
@ -62,7 +66,6 @@ def _initialize():
postponed=[], postponed=[],
nesting_level=0, nesting_level=0,
_get_models_cache={}, _get_models_cache={},
available_apps=None,
) )
@ -72,8 +75,7 @@ class BaseAppCache(object):
provide reverse-relations and for app introspection (e.g. admin). provide reverse-relations and for app introspection (e.g. admin).
This provides the base (non-Borg) AppCache class - the AppCache This provides the base (non-Borg) AppCache class - the AppCache
subclass adds borg-like behaviour for the few cases where it's needed, subclass adds borg-like behaviour for the few cases where it's needed.
and adds the code that auto-loads from INSTALLED_APPS.
""" """
def __init__(self): def __init__(self):
@ -83,9 +85,6 @@ class BaseAppCache(object):
self.loads_installed = False self.loads_installed = False
def _populate(self): def _populate(self):
"""
Stub method - this base class does no auto-loading.
"""
""" """
Fill in all the cache information. This method is threadsafe, in the Fill in all the cache information. This method is threadsafe, in the
sense that every caller will see the same state upon return, and if the sense that every caller will see the same state upon return, and if the