hackens-orga/hackens_orga/budget/views.py

18 lines
621 B
Python
Raw Normal View History

2023-01-16 18:50:12 +01:00
from rest_framework import viewsets
2023-02-16 19:09:40 +01:00
from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly
2023-01-16 18:50:12 +01:00
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
2023-02-16 19:09:40 +01:00
permission_class = [DjangoModelPermissionsOrAnonReadOnly]
2023-01-16 18:50:12 +01:00
class BudgetLineViewSet(viewsets.ModelViewSet):
queryset = BudgetLine.objects.all()
serializer_class = BudgetLineSerializer
2023-02-16 19:09:40 +01:00
permission_class = [DjangoModelPermissionsOrAnonReadOnly]