def vote(): data = request.json x = {'submission': 'successful'} response = app.response_class(response=json.dumps(data), status=200, mimetype='application/json') vote = Vote() vote.cast(data['session'], data['email'], data['framework']) return response
def vote(self, user, value): Vote.cast(user, self, value) self.fix_value()