30 lines
723 B
Python
Executable File
30 lines
723 B
Python
Executable File
from outbo.apps.core.viewsets import (
|
|
MultipleSerializerViewSet,
|
|
AutoPermissionViewSetMixin,
|
|
ListModelMixin,
|
|
RetrieveModelMixin,
|
|
)
|
|
from outbo.apps.organizations.models import Brand, Category
|
|
from outbo.apps.organizations.serializers import BrandSerializer, CategorySerializer
|
|
|
|
|
|
class BrandViewSet(
|
|
RetrieveModelMixin,
|
|
ListModelMixin,
|
|
AutoPermissionViewSetMixin,
|
|
MultipleSerializerViewSet,
|
|
):
|
|
queryset = Brand.objects.all()
|
|
serializer_class_set = BrandSerializer
|
|
|
|
|
|
class CategoryViewSet(
|
|
RetrieveModelMixin,
|
|
ListModelMixin,
|
|
AutoPermissionViewSetMixin,
|
|
MultipleSerializerViewSet,
|
|
):
|
|
|
|
queryset = Category.objects.all()
|
|
serializer_class_set = CategorySerializer
|