mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
improve comments and naming
This commit is contained in:
parent
975fe67b17
commit
d60841e1bb
1 changed files with 5 additions and 3 deletions
|
@ -654,14 +654,16 @@ def list_bills():
|
||||||
if "last_selected_payer" in session:
|
if "last_selected_payer" in session:
|
||||||
bill_form.payer.data = session["last_selected_payer"]
|
bill_form.payer.data = session["last_selected_payer"]
|
||||||
|
|
||||||
# Each item will be (weight_sum, Bill) tuple
|
# Each item will be (weight_sum, Bill) tuple.
|
||||||
weights_bills = g.project.get_bill_weights_ordered().paginate(
|
# TODO: improve this awkward result using column_property:
|
||||||
|
# https://docs.sqlalchemy.org/en/14/orm/mapped_sql_expr.html.
|
||||||
|
weighted_bills = g.project.get_bill_weights_ordered().paginate(
|
||||||
per_page=100, error_out=True
|
per_page=100, error_out=True
|
||||||
)
|
)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"list_bills.html",
|
"list_bills.html",
|
||||||
bills=weights_bills,
|
bills=weighted_bills,
|
||||||
member_form=MemberForm(g.project),
|
member_form=MemberForm(g.project),
|
||||||
bill_form=bill_form,
|
bill_form=bill_form,
|
||||||
csrf_form=csrf_form,
|
csrf_form=csrf_form,
|
||||||
|
|
Loading…
Reference in a new issue