Ejemplo n.º 1
0
def get_entity_collection_name_and_install_path(obj, attr):
    installation = get_installation(obj, None)
    if installation:
        entity_collection_name = installation.install_path.entity_collection_name
        install_path = installation.install_path.full.replace(':', '-')
    elif attr and has_entity_collection(attr):
        entity_collection_name = get_entity_collection(attr)
        install_path = ''
    else:
        raise RuntimeError("Unable to determine the entity collection for method %s" % attr)
    return entity_collection_name, install_path
Ejemplo n.º 2
0
def get_entity_collection_name_and_install_path(obj, attr):
    installation = get_installation(obj, None)
    if installation:
        entity_collection_name = installation.install_path.entity_collection_name
        install_path = installation.install_path.full.replace(':', '-')
    elif attr and has_entity_collection(attr):
        entity_collection_name = get_entity_collection(attr)
        install_path = ''
    else:
        raise RuntimeError(
            "Unable to determine the entity collection for method %s" % attr)
    return entity_collection_name, install_path
Ejemplo n.º 3
0
def get_entity_collection_name_and_install_path(obj, attr):
    installation = get_installation(obj, None)
    if installation:
        entity_collection_name = installation.install_path.entity_collection_name
        install_path = installation.install_path.full.replace(':', '-')
    elif attr and has_entity_collection(attr):
        entity_collection_name = get_entity_collection(attr)
        install_path = ''
    else:
        # todo: fix me
        entity_collection_name = "frames"  # hack to put global items in frames, until we get a global area in the docs
        install_path = ''
        # raise RuntimeError("Unable to determine the entity collection for method %s" % attr)
    return entity_collection_name, install_path