McDuck/tapdata/views.py

15 lines
381 B
Python
Raw Normal View History

2024-08-29 09:21:58 +00:00
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