From ff1a7e2c68d6f4fdc47ed43f5edb189a778a83c4 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Mon, 20 May 2024 20:48:46 +0200 Subject: [PATCH] feat: added search field for tag --- shop/api/v1/viewsets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/shop/api/v1/viewsets.py b/shop/api/v1/viewsets.py index e4b028d..3e877a0 100644 --- a/shop/api/v1/viewsets.py +++ b/shop/api/v1/viewsets.py @@ -182,3 +182,4 @@ class BrandViewSet(ModelViewSet): serializer_class = BrandSerializer queryset = Brand.objects.all() permission_classes = (IsAdminUser,) + search_fields = ("name",)