def dispatch_request(self):
        form = WalletForm(request.form)
        if request.method == 'POST' and form.validate():
            newwallet = Wallet(**form.data)
            session.add(newwallet)
            session.commit()
            flash("%s: Wallet added" % newwallet.label)
            return redirect(url_for("wallet.wallet_list"))
        return render_template("wallet/wallet/add.html", form=form)
dataset/ETHPy150Open nkuttler/flaskwallet/walletapp/views/wallet.py/WalletAddView.dispatch_request/original