From 354807b3135764b0816d0029805480bc2142b0ac Mon Sep 17 00:00:00 2001 From: Jordan Robinson Date: Wed, 24 Sep 2025 22:58:17 +0100 Subject: [PATCH] fix public post list filtering --- main/views/general.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/views/general.py b/main/views/general.py index 294a62e3331fd6e2063655a7abe9993a7b4de685..b4c38f847ed40682a689ff660030fca13c03e2d3 100644 --- a/main/views/general.py +++ b/main/views/general.py @@ -139,6 +139,13 @@ def post_list(request): published_at__lte=timezone.now().date(), ).defer("body") + # filter by tags if given + tags = request.GET.get("tags") + if tags: + tag_list = [t.strip() for t in tags.split(",") if t.strip()] + for tag in tag_list: + posts = posts.with_tag(tag) + license_url = request.build_absolute_uri(reverse('rsl_license')) # active tags as list