diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py index 6c19b0c..b53361b 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -48,9 +48,10 @@ def send_upload(path): def home_page(): query = Package.query.filter_by(approved=True, soft_deleted=False) count = query.count() - new = query.order_by(db.desc(Package.created_at)).limit(12).all() + new = query.order_by(db.desc(Package.created_at)).limit(8).all() popular = query.order_by(db.desc(Package.score)).limit(8).all() - return render_template("index.html", new=new, popular=popular, count=count) + pop_txp = query.filter_by(type=PackageType.TXP).order_by(db.desc(Package.score)).limit(4).all() + return render_template("index.html", new=new, popular=popular, count=count, pop_txp=pop_txp) from . import users, githublogin, packages, meta, threads, api from . import tasks, admin, notifications, tagseditor, licenseseditor |