def get_apphook_field_names(model):
    """
    Cache app-hook field names on model

    :param model: model class or object
    :return: list of foreign key field names to AppHookConfigs
    """
    key = APP_CONFIG_FIELDS_KEY.format(
        app_label=model._meta.app_label,
        model_name=model._meta.object_name
    ).lower()
    if not hasattr(model, key):
        field_names = _get_apphook_field_names(model)
        setattr(model, key, field_names)
    return getattr(model, key)
def get_apphook_field_names ( model ) : key = APP_CONFIG_FIELDS_KEY . format ( app_label = model . _meta . app_label , model_name = model . _meta . object_name ) . lower ( ) if not hasattr ( model , key ) : field_names = _get_apphook_field_names ( model ) setattr ( model , key , field_names ) return getattr ( model , key )
Cache app-hook field names on model

    :param model: model class or object
    :return: list of foreign key field names to AppHookConfigs