def dispatch_request(self, id):
        super(WalletEditView, self).dispatch_request(id)
        form = WalletForm(request.form, self.wallet)
        if request.method == 'POST' and form.validate():
            form.populate_obj(self.wallet)
            session.commit()
            flash(u"%s: Wallet updated" % self.wallet.label, 'info')
            return redirect(url_for("wallet.wallet_list"))
        return render_template("wallet/wallet/edit.html", wallet=self.wallet,
                               form=form)
dataset/ETHPy150Open nkuttler/flaskwallet/walletapp/views/wallet.py/WalletEditView.dispatch_request/original