from handover_api.models import User, Handover, Draft
from rest_framework import viewsets
from serializers import UserSerializer, HandoverSerializer, DraftSerializer


class UserViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer


class HandoverViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows handovers to be viewed or edited.
    """
    queryset = Handover.objects.all()
    serializer_class = HandoverSerializer


class DraftViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows drafts to be viewed or edited.
    """
    queryset = Draft.objects.all()
    serializer_class = DraftSerializer
from rest_framework import viewsets
from handover_api.models import User, Handover, Draft
from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer


class UserViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer


class HandoverViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows handovers to be viewed or edited.
    """
    queryset = Handover.objects.all()
    serializer_class = HandoverSerializer


class DraftViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows drafts to be viewed or edited.
    """
    queryset = Draft.objects.all()
    serializer_class = DraftSerializer
Update import of serializers for python3 compatibility
Update import of serializers for python3 compatibility

+ from rest_framework import viewsets
  from handover_api.models import User, Handover, Draft
- from rest_framework import viewsets
- from serializers import UserSerializer, HandoverSerializer, DraftSerializer
+ from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer
  
  
  class UserViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows users to be viewed or edited.
      """
      queryset = User.objects.all()
      serializer_class = UserSerializer
  
  
  class HandoverViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows handovers to be viewed or edited.
      """
      queryset = Handover.objects.all()
      serializer_class = HandoverSerializer
  
  
  class DraftViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows drafts to be viewed or edited.
      """
      queryset = Draft.objects.all()
      serializer_class = DraftSerializer
Update import of serializers for python3 compatibility
## Code Before:
from handover_api.models import User, Handover, Draft
from rest_framework import viewsets
from serializers import UserSerializer, HandoverSerializer, DraftSerializer


class UserViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer


class HandoverViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows handovers to be viewed or edited.
    """
    queryset = Handover.objects.all()
    serializer_class = HandoverSerializer


class DraftViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows drafts to be viewed or edited.
    """
    queryset = Draft.objects.all()
    serializer_class = DraftSerializer
## Instruction:
Update import of serializers for python3 compatibility
## Code After:
from rest_framework import viewsets
from handover_api.models import User, Handover, Draft
from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer


class UserViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer


class HandoverViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows handovers to be viewed or edited.
    """
    queryset = Handover.objects.all()
    serializer_class = HandoverSerializer


class DraftViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows drafts to be viewed or edited.
    """
    queryset = Draft.objects.all()
    serializer_class = DraftSerializer