def get_apps():
    try:
        # django >= 1.7, to support AppConfig
        from django.apps import apps
        return [app.models_module for app in apps.get_app_configs() if app.models_module]
    except __HOLE__:
        from django.db import models
        return models.get_apps()
dataset/ETHPy150Open django-extensions/django-extensions/django_extensions/compat.py/get_apps