aboutsummaryrefslogtreecommitdiff
path: root/app/blueprints/threads
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-21 22:40:51 +0000
committerGitHub <noreply@github.com>2020-01-21 22:40:51 +0000
commitf24148d43189bd72f7ef7f498f30cdee8700d5e5 (patch)
treea67bd8c8373d86496536c096f00682594668f530 /app/blueprints/threads
parent980023a80c9055f0102c2308cd1d1d7238deb69e (diff)
downloadcheatdb-f24148d43189bd72f7ef7f498f30cdee8700d5e5.tar.xz
Improve package page styling
Diffstat (limited to 'app/blueprints/threads')
-rw-r--r--app/blueprints/threads/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/blueprints/threads/__init__.py b/app/blueprints/threads/__init__.py
index 73d64c2..8d6c22d 100644
--- a/app/blueprints/threads/__init__.py
+++ b/app/blueprints/threads/__init__.py
@@ -28,12 +28,19 @@ import datetime
from flask_wtf import FlaskForm
from wtforms import *
from wtforms.validators import *
+from app.utils import get_int_or_abort
@bp.route("/threads/")
def list_all():
query = Thread.query
if not Permission.SEE_THREAD.check(current_user):
query = query.filter_by(private=False)
+
+ pid = request.args.get("pid")
+ if pid:
+ pid = get_int_or_abort(pid)
+ query = query.filter_by(package_id=pid)
+
return render_template("threads/list.html", threads=query.all())