feat: enable editing of media slug, show categories on manage media

This commit is contained in:
Markos Gogoulos
2025-06-24 11:13:33 +03:00
committed by GitHub
parent a5acce4ab1
commit 83f3eec940
14 changed files with 85 additions and 9 deletions

View File

@@ -46,6 +46,7 @@ class MediaList(APIView):
featured = params.get("featured", "").strip()
is_reviewed = params.get("is_reviewed", "").strip()
category = params.get("category", "").strip()
sort_by_options = [
"title",
@@ -98,6 +99,9 @@ class MediaList(APIView):
if is_reviewed != "all":
qs = qs.filter(is_reviewed=is_reviewed)
if category:
qs = qs.filter(category__title__contains=category)
media = qs.order_by(f"{ordering}{sort_by}")
paginator = pagination_class()