Ejemplo n.º 1
0
def resource_show(context, data_dict):
    '''
    Wraps the default resource_show and adds additional information like:
    resource size (for uploaded files) and resource revision timestamp
    '''
    resource_dict = logic_get.resource_show(context, data_dict)

    # TODO: check if needed. Apparently the default resource_show() action anyway calls package_show
    _additional_hdx_resource_show_processing(context, resource_dict)

    return resource_dict
Ejemplo n.º 2
0
def resource_show(context, data_dict):
    '''
    Wraps the default resource_show and adds additional information like:
    resource size (for uploaded files) and resource revision timestamp
    '''
    resource_dict = logic_get.resource_show(context, data_dict)

    # TODO: check if needed. Apparently the default resource_show() action anyway calls package_show
    if _should_manually_load_property_value(context, resource_dict, 'size'):
        resource_dict['size'] = _get_resource_filesize(resource_dict)

    if _should_manually_load_property_value(context, resource_dict, 'revision_last_updated'):
        resource_dict['revision_last_updated'] = _get_resource_revison_timestamp(resource_dict)

    if _should_manually_load_property_value(context, resource_dict, 'hdx_rel_url'):
        resource_dict['hdx_rel_url'] = _get_resource_hdx_relative_url(resource_dict)

    return resource_dict
Ejemplo n.º 3
0
def resource_show(context, data_dict):
    resource = core_get.resource_show(context, data_dict)
    change_resource_details(resource)
    return resource
Ejemplo n.º 4
0
def resource_show(context, data_dict):
    resource = core_get.resource_show(context, data_dict)
    change_resource_details(resource)
    return resource
Ejemplo n.º 5
0
def resource_show(context, data_dict):
    resource_dict = get.resource_show(context, data_dict)
    # send_resource_log(context, resource_dict, 'Resource metadata accessed',
    #                   'ResourceMetadataAccessed')

    return resource_dict