aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-22 21:13:56 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-22 21:13:56 +0000
commit89cae279cd0b31cd257e3983a4f2b285beb719e1 (patch)
treeb22f1cd188a8799704cc94f7259c62b8bf99fc32 /app/views
parentfd901726b05a24e303501f23ef836d4594872684 (diff)
downloadcheatdb-89cae279cd0b31cd257e3983a4f2b285beb719e1.tar.xz
Add top games to home page
Diffstat (limited to 'app/views')
-rw-r--r--app/views/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py
index b53361b..6e4794b 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -50,8 +50,10 @@ def home_page():
count = query.count()
new = query.order_by(db.desc(Package.created_at)).limit(8).all()
popular = query.order_by(db.desc(Package.score)).limit(8).all()
+ pop_gam = query.filter_by(type=PackageType.GAME).order_by(db.desc(Package.score)).limit(4).all()
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)
+ return render_template("index.html", count=count, \
+ new=new, popular=popular, pop_txp=pop_txp, pop_gam=pop_gam)
from . import users, githublogin, packages, meta, threads, api
from . import tasks, admin, notifications, tagseditor, licenseseditor