bb307d34d2
- Adds django rest framework to requirements - Adds basic plant model with id and name fields - Adds CRUD endpoints to interact with plant objects
10 lines
325 B
Python
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
|