def document_link(resource, document_id, version=None):
 version_part = (('?version=%s' % version) if version else '')
 return {'title': ('%s' % config.DOMAIN[resource]['item_title']), 'href': ('%s/%s%s' % (resource_link(), document_id, version_part))}

def document_link ( resource , document_id , version = None ) : version_part = ( ( '?version=%s' % version ) if version else '' ) return { 'title' : ( '%s' % config . DOMAIN [ resource ] [ 'item_title' ] ) , 'href' : ( '%s/%s%s' % ( resource_link ( ) , document_id , version_part ) ) }
public link to the document .