# backend/formulas/views/category.py from rest_framework.viewsets import ModelViewSet from formulas.models.category import FormulaCategory from formulas.serializers.category import FormulaCategorySerializer from formulas.permissions import IsAdminOrEditor from rest_framework.permissions import IsAuthenticatedOrReadOnly class FormulaCategoryViewSet(ModelViewSet): queryset = FormulaCategory.objects.all() serializer_class = FormulaCategorySerializer permission_classes = [IsAuthenticatedOrReadOnly]