hackens-orga/hackens_orga/budget/views.py

18 lines
588 B
Python
Raw Normal View History

2023-01-16 18:50:12 +01:00
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticatedOrReadOnly
2023-02-08 02:04:34 +01:00
from .models import BudgetGroup, BudgetLine
from .serializers import BudgetGroupSerializer, BudgetLineSerializer
2023-01-16 18:50:12 +01:00
class BudgetGroupViewSet(viewsets.ModelViewSet):
queryset = BudgetGroup.objects.all()
serializer_class = BudgetGroupSerializer
permission_class = [IsAuthenticatedOrReadOnly]
class BudgetLineViewSet(viewsets.ModelViewSet):
queryset = BudgetLine.objects.all()
serializer_class = BudgetLineSerializer
permission_class = [IsAuthenticatedOrReadOnly]