def METHOD_NAME(attachment, type_=""):
    if not attachment:
        return ''
    type_ = attachment.content_type.model if not type_ else type_
    return "{}={}:{}".format(REFRESH_PARAM, type_, attachment.id)