aboutsummaryrefslogtreecommitdiff
path: root/budget/web.py
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-11-28 01:42:02 +0100
committerAlexis Metaireau <alexis@notmyidea.org>2011-11-28 01:42:02 +0100
commit3a2958a44ea6bc5cf452f2e75f9eb372ee0d513d (patch)
tree7607b5557d0005a6bda017fc2cc0df2cff39ccef /budget/web.py
parent46f98078065a2c75c69523e39f4bd77575cf7a1e (diff)
downloadihatemoney-mirror-3a2958a44ea6bc5cf452f2e75f9eb372ee0d513d.zip
ihatemoney-mirror-3a2958a44ea6bc5cf452f2e75f9eb372ee0d513d.tar.gz
ihatemoney-mirror-3a2958a44ea6bc5cf452f2e75f9eb372ee0d513d.tar.bz2
Add a 'sumbit and add a new one' button for new bills. Fix #53
Diffstat (limited to 'budget/web.py')
-rw-r--r--budget/web.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/budget/web.py b/budget/web.py
index 2dc014a..5b10460 100644
--- a/budget/web.py
+++ b/budget/web.py
@@ -245,9 +245,11 @@ def list_bills():
if 'last_selected_payer' in session:
bill_form.payer.data = session['last_selected_payer']
bills = g.project.get_bills()
+
return render_template("list_bills.html",
bills=bills, member_form=MemberForm(g.project),
- bill_form=bill_form
+ bill_form=bill_form,
+ add_bill='add_bill' in request.values
)
@main.route("/<project_id>/members/add", methods=["GET", "POST"])
@@ -298,7 +300,7 @@ def add_bill():
db.session.commit()
flash(_("The bill has been added"))
- return redirect(url_for('.list_bills'))
+ return redirect(url_for('.list_bills', add_bill=form.submit2.data))
return render_template("add_bill.html", form=form)