From 4820d11ce3467a0c2206cd04c411b065606bac9d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 14 Dec 2020 11:52:38 +0000 Subject: [PATCH] Tweak homepage row limits --- app/blueprints/homepage/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/blueprints/homepage/__init__.py b/app/blueprints/homepage/__init__.py index bda697b8..3e2e79ab 100644 --- a/app/blueprints/homepage/__init__.py +++ b/app/blueprints/homepage/__init__.py @@ -18,10 +18,10 @@ def home(): query = Package.query.filter_by(state=PackageState.APPROVED) count = query.count() - new = join(query.order_by(db.desc(Package.approved_at))).limit(8).all() + new = join(query.order_by(db.desc(Package.approved_at))).limit(4).all() pop_mod = join(query.filter_by(type=PackageType.MOD).order_by(db.desc(Package.score))).limit(8).all() - pop_gam = join(query.filter_by(type=PackageType.GAME).order_by(db.desc(Package.score))).limit(4).all() - pop_txp = join(query.filter_by(type=PackageType.TXP).order_by(db.desc(Package.score))).limit(4).all() + pop_gam = join(query.filter_by(type=PackageType.GAME).order_by(db.desc(Package.score))).limit(8).all() + pop_txp = join(query.filter_by(type=PackageType.TXP).order_by(db.desc(Package.score))).limit(8).all() high_reviewed = join(query.order_by(db.desc(Package.score - Package.score_downloads))) \ .filter(Package.reviews.any()).limit(4).all()