def autodiscover(self):
    '\n        Autodiscovers all admin2.py modules for apps in INSTALLED_APPS by\n        trying to import them.\n        '
    for app_name in [x for x in settings.INSTALLED_APPS]:
        try:
            import_module(('%s.admin2' % app_name))
        except ImportError as e:
            if (str(e).startswith('No module named') and ('admin2' in str(e))):
                continue
            raise e
Autodiscovers all admin2.py modules for apps in INSTALLED_APPS by
trying to import them.
def autodiscover(self):
    '\n        Autodiscovers all admin2.py modules for apps in INSTALLED_APPS by\n        trying to import them.\n        '
    for app_name in [x for x in settings.INSTALLED_APPS]:
        try:
            import_module(('%s.admin2' % app_name))
        except ImportError as e:
            if (str(e).startswith('No module named') and ('admin2' in str(e))):
                continue
            raise e