'Represent a Request'

@staticmethod
def req_represent(id, row=None, show_link=True, pdf=False):

    if row:
        table = current.db.req_req
    elif (not id):
        return current.messages['NONE']
    else:
        id = int(id)
        if id:
            db = current.db
            table = db.req_req
            row = db((table.id == id)).select(table.date, table.req_ref, table.site_id, limitby=(0, 1)).first()
    try:
        if row.req_ref:
            req = row.req_ref
        else:
            req = ('%s    -    %s' % (table.site_id.represent(row.site_id, show_link=False), table.date.represent(row.date)))
    except:
        return current.messages.UNKNOWN_OPT
    if show_link:
        if pdf:
            args = [id, 'form']
            _title = current.T('Open    PDF')
        else:
            args = [id]
            _title = current.T('Go    to    Request')
        return A(req, _href=URL(c='req', f='req', args=args), _title=_title)
    else:
        return req
