def save(**kwargs): client = Client() client.name = kwargs['name'] client.email = kwargs['email'] save_command = SaveCommand() result = save_command.execute(client) return render_template('insert.html', message=result.result)
def update(**kwargs): client = Client() client.id = kwargs['id'] client.name = kwargs['name'] client.email = kwargs['email'] update_command = UpdateCommand() result = update_command.execute(client) return render_template('index.html', message=result.result)