'Represent a (key, value) as hypertext link.
@param k: the key (site_id)
@param v: the representation of the key
@param row: the row with this key'

def link(self, k, v, row=None):

    if row:
        try:
            url = row['doc_document.url']
        except AttributeError:
            return v
        else:
            if url:
                return A(v, _href=url, _target='blank')
    return v
