summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-15 20:46:46 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-17 10:17:46 +0100
commitf831da2feddf63c3be17d53d460bbacd1d59ddce (patch)
treedcd5d4446276c00bcedf1eda510971cccfd5ee67
parentb3e182faba4a45ae617509bc5e15fd0b8e096e9a (diff)
Inlined trivial method that was used only once.
-rw-r--r--django/apps/cache.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/django/apps/cache.py b/django/apps/cache.py
index e91804d6ac..9b847cc309 100644
--- a/django/apps/cache.py
+++ b/django/apps/cache.py
@@ -96,13 +96,6 @@ class BaseAppCache(object):
finally:
imp.release_lock()
- def _label_for(self, app_mod):
- """
- Return app_label for given models module.
-
- """
- return app_mod.__name__.split('.')[-2]
-
def load_app(self, app_name, can_postpone=False):
"""
Loads the app with the provided fully qualified name, and returns the
@@ -240,7 +233,7 @@ class BaseAppCache(object):
pass
self.populate()
if app_mod:
- app_label = self._label_for(app_mod)
+ app_label = app_mod.__name__.split('.')[-2]
try:
app_config = self.app_configs[app_label]
except KeyError: