def get_models_for_app(app_label):
    """Returns the models in the given app."""
    try:
        # django >= 1.7
        from django.apps import apps
        return apps.get_app_config(app_label).get_models()
    except __HOLE__:
        from django.db.models import get_app, get_models
        return get_models(get_app(app_label))
dataset/ETHPy150Open django-extensions/django-extensions/django_extensions/compat.py/get_models_for_app