def list_apps():
    try:
        # django >= 1.7, to support AppConfig
        from django.apps import apps
        return [app.name for app in apps.get_app_configs()]
    except __HOLE__:
        # old way
        return list(settings.INSTALLED_APPS)
dataset/ETHPy150Open django-extensions/django-extensions/django_extensions/compat.py/list_apps