blob: 0419ce82b8e75f823a673e4fdf4c0a3f80a3b062 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from rest_framework.generics import ListAPIView, RetrieveAPIView
from procurement.models import Component
from procurement.serializers import ComponentSerializer
class ComponentAPIList(ListAPIView):
queryset = Component.objects.all()
serializer_class = ComponentSerializer
class ComponentAPIRetrieve(RetrieveAPIView):
queryset = Component.objects.all()
serializer_class = ComponentSerializer
|