From b7f187e7062b45a9222abd2428c616889e08fa72 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 6 Mar 2024 21:37:07 +1300 Subject: [PATCH] sub-topics - public-facing UI #44 --- app/main/routes.py | 2 +- app/templates/topic/show_topic.html | 9 ++++++++- app/topic/routes.py | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/main/routes.py b/app/main/routes.py index 08b7cc7e..9a2b3550 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -147,7 +147,7 @@ def home_page(type, sort): @bp.route('/topics', methods=['GET']) def list_topics(): verification_warning() - topics = Topic.query.order_by(Topic.name).all() + topics = Topic.query.filter_by(parent_id=None).order_by(Topic.name).all() return render_template('list_topics.html', topics=topics, title=_('Browse by topic'), low_bandwidth=request.cookies.get('low_bandwidth', '0') == '1', diff --git a/app/templates/topic/show_topic.html b/app/templates/topic/show_topic.html index 3af75077..9d837766 100644 --- a/app/templates/topic/show_topic.html +++ b/app/templates/topic/show_topic.html @@ -17,7 +17,14 @@