summaryrefslogtreecommitdiff
path: root/procurement/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'procurement/api.py')
-rw-r--r--procurement/api.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/procurement/api.py b/procurement/api.py
new file mode 100644
index 0000000..0419ce8
--- /dev/null
+++ b/procurement/api.py
@@ -0,0 +1,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