def spend_hours(request): hour = Hour() hour.category = "game" hour.save() output = "Gaming hour claimed!" return HttpResponse(output)
def redeem_hour(request): category = request.POST["type"] hour = Hour() hour.category = category hour.save() output = "Earned " + category + " Hour" return HttpResponse(output)