def post(self, request, *args, **kwargs): # self.object = self.get_object() context = super(IndexView, self).get_context_data(**kwargs) if request.POST != None: print (request.POST['score']) print (request.POST['dishName']) print (request.POST['venue_id']) Dish.submit_rating(request.POST['venue_id'], request.POST['dishName'], int(request.POST['score']) ) return self.render_to_response(context)
def post(self, request, *args, **kwargs): # self.object = self.get_object() context = super(RestaurantView, self).get_context_data(**kwargs) if request.POST != None: # dishToRate = Dish() print (request.POST['score']) print (request.POST['dishName']) print (request.POST['venue_id']) Dish.submit_rating(request.POST['venue_id'], request.POST['dishName'], int(request.POST['score']) ) return self.render_to_response(context) '''requests Locu Details for restaurant giving us info like menu