2025-08-31 23:05:53 +02:00

12 lines
524 B
Python

# 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]