def dotransform(request, response):
    p = JSONDecoder().decode(
        pipljsonsearch(first_name=request.entity.firstnames or '',
                       last_name=request.entity.lastname or ''))

    if 'error' in p:
        response += UIMessage(p['error'])

    for r in p['results']['records']:
        if 'relationships' in r:
            for rel in r['relationships']:
                e = Person(rel['name']['display'])
                e += Label('Source',
                           '<a href="%s">%s</a>' %
                           (r['source']['url'], r['source']['@ds_name']),
                           type='text/html')
                response += e

    return response
def dotransform(request, response):
    p = JSONDecoder().decode(
        pipljsonsearch(first_name=request.fields['firstname'],
                       last_name=request.fields['lastname']))

    if 'error' in p:
        response += UIMessage(p['error'])

    for r in p['results']['records']:
        if 'addresses' in r:
            for a in r['addresses']:
                e = Location(a['display'])
                e.countrycode = a['country']
                e += Label('Source',
                           '<a href="%s">%s</a>' %
                           (r['source']['url'], r['source']['@ds_name']),
                           type='text/html')
                response += e

    return response
def dotransform(request, response):
    p = JSONDecoder().decode(
        pipljsonsearch(
            first_name=request.fields['firstname'],
            last_name=request.fields['lastname']
        )
    )

    if 'error' in p:
        response += UIMessage(p['error'])

    for r in p['results']['records']:
        if 'relationships' in r:
            for rel in r['relationships']:
                e = Person(rel['name']['display'])
                e += Label(
                    'Source', '<a href="%s">%s</a>' % (r['source']['url'], r['source']['@ds_name']), type='text/html'
                )
                response += e

    return response
def dotransform(request, response):
    p = JSONDecoder().decode(
        pipljsonsearch(
            first_name=request.entity.firstnames or '',
            last_name=request.entity.lastname or ''
        )
    )

    if 'error' in p:
        response += UIMessage(p['error'])

    for r in p['results']['records']:
        if 'addresses' in r:
            for a in r['addresses']:
                e = Location(a['display'])
                e.countrycode = a['country']
                e += Label(
                    'Source', '<a href="%s">%s</a>' % (r['source']['url'], r['source']['@ds_name']), type='text/html'
                )
                response += e

    return response