Inlined trivial method that was used only once.
This commit is contained in:
parent
b3e182faba
commit
f831da2fed
|
@ -96,13 +96,6 @@ class BaseAppCache(object):
|
||||||
finally:
|
finally:
|
||||||
imp.release_lock()
|
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):
|
def load_app(self, app_name, can_postpone=False):
|
||||||
"""
|
"""
|
||||||
Loads the app with the provided fully qualified name, and returns the
|
Loads the app with the provided fully qualified name, and returns the
|
||||||
|
@ -240,7 +233,7 @@ class BaseAppCache(object):
|
||||||
pass
|
pass
|
||||||
self.populate()
|
self.populate()
|
||||||
if app_mod:
|
if app_mod:
|
||||||
app_label = self._label_for(app_mod)
|
app_label = app_mod.__name__.split('.')[-2]
|
||||||
try:
|
try:
|
||||||
app_config = self.app_configs[app_label]
|
app_config = self.app_configs[app_label]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue