コード例 #1
0
def patch_is_hidden(request, thread, value):
    if value:
        allow_hide_thread(request.user, thread)
        moderation.hide_thread(request, thread)
    else:
        allow_unhide_thread(request.user, thread)
        moderation.unhide_thread(request, thread)

    return {'is_hidden': thread.is_hidden}
コード例 #2
0
def patch_is_hidden(request, thread, value):
    if value:
        allow_hide_thread(request.user, thread)
        moderation.hide_thread(request, thread)
    else:
        allow_unhide_thread(request.user, thread)
        moderation.unhide_thread(request, thread)

    return {'is_hidden': thread.is_hidden}