def METHOD_NAME(request):
    updateid = int(request.matchdict['update_id'])
    title = request.POST["title"].strip()
    content = request.POST["content"].strip()
    wesley = "wesley" in request.POST
    if not title:
        raise WeasylError("titleInvalid")
    if not content:
        raise WeasylError("contentInvalid")
    siteupdate.edit(
        updateid=updateid,
        title=title,
        content=content,
        wesley=wesley,
    )
    return HTTPSeeOther(location="/site-updates/%d" % (updateid,))