(request, post, **kwargs)
return url
Close this post and provide a rationale for closing as well.
Close this post and provide a rationale for closing as well.
Close this post and provide a rationale for closing as well .
def close(request, post, **kwargs):

    """
    Close this post and provide a rationale for closing as well.
    """
    user = request.user
    Post.objects.filter(uid=post.uid).update(status=Post.CLOSED)
    # Generate a rationale post on why this post is closed.
    rationale = mod_rationale(post=post, user=user,
                              template="messages/closed.md")
    msg = "closed"
    url = rationale.get_absolute_url()
    messages.info(request, mark_safe(msg))
    auth.db_logger(user=user, text=f"{msg}", post=post)
    return url
def close ( request , post , * * kwargs ) : user = request . user Post . objects . filter ( uid = post . uid ) . update ( status = Post . CLOSED ) # Generate a rationale post on why this post is closed. rationale = mod_rationale ( post = post , user = user , template = "messages/closed.md" ) msg = "closed" url = rationale . get_absolute_url ( ) messages . info ( request , mark_safe ( msg ) ) auth . db_logger ( user = user , text = f"{msg}" , post = post ) return url