15 lines
381 B
Python
15 lines
381 B
Python
|
from rest_framework import viewsets
|
||
|
from .models import Farming, Prizes
|
||
|
from .serializers import FarmingSerializer, PrizesSerializer
|
||
|
|
||
|
|
||
|
|
||
|
class FarmingViewSet(viewsets.ModelViewSet):
|
||
|
queryset = Farming.objects.all()
|
||
|
serializer_class = FarmingSerializer
|
||
|
|
||
|
class PrizesViewSet(viewsets.ModelViewSet):
|
||
|
queryset = Prizes.objects.all()
|
||
|
serializer_class = PrizesSerializer
|
||
|
|