mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-21 13:57:57 -05:00
feat: enable editing of media slug, show categories on manage media
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user