From 512db6643a148932d6f734972f23ddf55a2e91ac Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Thu, 17 Jul 2008 17:47:19 +0000 Subject: [PATCH] Only display 10 most recent of each type of transaction on home page --- bluechips/controllers/status.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bluechips/controllers/status.py b/bluechips/controllers/status.py index cba63e3..faadfc5 100644 --- a/bluechips/controllers/status.py +++ b/bluechips/controllers/status.py @@ -38,11 +38,13 @@ class StatusController(BaseController): model.expenditures.c.date < this_month)) c.expenditures = meta.Session.query(model.Expenditure).\ - filter(model.Expenditure.spender==request.environ['user']).all() + filter(model.Expenditure.spender==request.environ['user']).\ + limit(10).all() c.transfers = meta.Session.query(model.Transfer).\ filter(sqlalchemy.or_( model.Transfer.debtor==request.environ['user'], - model.Transfer.creditor==request.environ['user'])).all() + model.Transfer.creditor==request.environ['user'])).\ + limit(10).all() return render('/status/index.mako') -- 2.45.2