def add_post(request): if request.method != 'POST': return HttpResponse("should be post") if 'beverage_id' in request.POST and 'comment' in request.POST: post = Post(beverage_id = request.POST['beverage_id'], comment = request.POST['comment']) post.put() return HttpResponse("completed")