Features: 1) Add lookup_field and lookup_url_kwarg to Category and Brand viewsets;

Fixes:

Extra: 1) No changes to existing logic;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-08-18 15:43:30 +03:00
parent 5c18404b53
commit 421e4a083f

View file

@ -283,6 +283,8 @@ class CategoryViewSet(EvibesViewSet):
action_serializer_classes = {
"list": CategorySimpleSerializer,
}
lookup_field = "lookup_value"
lookup_url_kwarg = "lookup_value"
additional = {"seo_meta": "ALLOW"}
def get_object(self):
@ -403,6 +405,8 @@ class BrandViewSet(EvibesViewSet):
action_serializer_classes = {
"list": BrandSimpleSerializer,
}
lookup_field = "lookup_value"
lookup_url_kwarg = "lookup_value"
additional = {"seo_meta": "ALLOW"}
def get_object(self):