right-tree/backend/right_tree/api/views.py
Dana Lambert bb307d34d2 Add django rest framework and basic plant model
- Adds django rest framework to requirements
- Adds basic plant model with id and name fields
- Adds CRUD endpoints to interact with plant objects
2021-10-07 08:59:57 +13:00

10 lines
325 B
Python

from rest_framework import viewsets
from right_tree.api.models import Plant
from right_tree.api.serializers import PlantSerializer
class PlantViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows hours to be grouped or edited.
"""
queryset = Plant.objects.all()
serializer_class = PlantSerializer