def load_post_webhook(request):
    """
    Webhook to insert/update a WordPress.com post on the local Django site.
    Call this after making changes to the post in WP Admin.
    The post is processed asynchronously so that a response can be returned to WordPress.com immediately.

    :param request: Should contain the WordPress post ID, named "ID", in POST form data
    :return: JsonResponse indicated the refresh is in progress.
    """
    try:
        wp_post_id = int(request.POST["ID"])
    except:
        raise Http404("Post does not exist")

    # load this asynchronously so that the webhook gets a fast response
    load_post.after_response(wp_post_id)
    return JsonResponse({"status": "Refreshing wp_post_id: {}".format(wp_post_id)})
def load_post_webhook ( request ) : try : wp_post_id = int ( request . POST [ "ID" ] ) except : raise Http404 ( "Post does not exist" ) load_post . after_response ( wp_post_id ) return JsonResponse ( { "status" : "Refreshing wp_post_id: {}" . format ( wp_post_id ) } )
Webhook to insert/update a WordPress.com post on the local Django site.
    Call this after making changes to the post in WP Admin.
    The post is processed asynchronously so that a response can be returned to WordPress.com immediately.

    :param request: Should contain the WordPress post ID, named "ID", in POST form data
    :return: JsonResponse indicated the refresh is in progress.