from rest_framework.viewsets import ModelViewSet
from formulas.models.symbol import Symbol
from formulas.serializers.symbol import SymbolSerializer
from formulas.permissions import IsAdminOrEditor

class SymbolViewSet(ModelViewSet):
    queryset = Symbol.objects.all()
    serializer_class = SymbolSerializer
    permission_classes = [IsAdminOrEditor]
    lookup_field = "code"
