hackens-orga/hackens_orga/budget/views.py
2023-02-16 19:09:40 +01:00

17 lines
621 B
Python

from rest_framework import viewsets
from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly
from .models import BudgetGroup, BudgetLine
from .serializers import BudgetGroupSerializer, BudgetLineSerializer
class BudgetGroupViewSet(viewsets.ModelViewSet):
queryset = BudgetGroup.objects.all()
serializer_class = BudgetGroupSerializer
permission_class = [DjangoModelPermissionsOrAnonReadOnly]
class BudgetLineViewSet(viewsets.ModelViewSet):
queryset = BudgetLine.objects.all()
serializer_class = BudgetLineSerializer
permission_class = [DjangoModelPermissionsOrAnonReadOnly]