(request, object_id, app_label, model_label)
return HttpResponse(json.dumps(ctx))
Get number of comments for selected target
Get number of comments for selected target
Get number of comments for selected target
def get_comment_count(request, object_id, app_label, model_label):
    """
    Get number of comments for selected target
    """
    comments = get_related_comments(object_id, app_label, model_label)

    ctx = {
        'success': True,
        'message': len(comments),
    }

    return HttpResponse(json.dumps(ctx));
def get_comment_count ( request , object_id , app_label , model_label ) : comments = get_related_comments ( object_id , app_label , model_label ) ctx = { 'success' : True , 'message' : len ( comments ) , } return HttpResponse ( json . dumps ( ctx ) )