from rest_framework import viewsets from .models import UserStake, Stake from .serializers import UserStakeSerializer, StakeSerializer class UserStakeViewSet(viewsets.ModelViewSet): queryset = UserStake.objects.all() serializer_class = UserStakeSerializer class StakeViewSet(viewsets.ModelViewSet): queryset = Stake.objects.all() serializer_class = StakeSerializer