mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #21871 -- Fixed Apps.is_installed() for apps with custom label.
Thanks Aymeric for design discussion.
This commit is contained in:
@@ -204,8 +204,7 @@ class Apps(object):
|
||||
It's safe to call this method at import time, even while the registry
|
||||
is being populated. It returns False for apps that aren't loaded yet.
|
||||
"""
|
||||
app_config = self.app_configs.get(app_name.rpartition(".")[2])
|
||||
return app_config is not None and app_config.name == app_name
|
||||
return any(ac.name == app_name for ac in self.app_configs.values())
|
||||
|
||||
def get_containing_app_config(self, object_name):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user