from models import Hotel, Client, Stay
from rest_framework import viewsets
from api.serializers import ClientSerializer, HotelSerializer, StaySerializer


class ClientViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows hotel's clients to be viewed or edited.
    """
    queryset = Client.objects.all().order_by('-created')
    serializer_class = ClientSerializer


class HotelViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Hotel.objects.all()
    serializer_class = HotelSerializer


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer
e64b93185fcb4c32ef290cc72dc317c35a32b0b3
<mask token>


class HotelViewSet(viewsets.ModelViewSet):
    <mask token>
    <mask token>
    <mask token>


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer

<mask token>


class HotelViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Hotel.objects.all()
    serializer_class = HotelSerializer


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer

<mask token>


class ClientViewSet(viewsets.ModelViewSet):
    <mask token>
    <mask token>
    <mask token>


class HotelViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Hotel.objects.all()
    serializer_class = HotelSerializer


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer

<mask token>


class ClientViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows hotel's clients to be viewed or edited.
    """
    queryset = Client.objects.all().order_by('-created')
    serializer_class = ClientSerializer


class HotelViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Hotel.objects.all()
    serializer_class = HotelSerializer


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer

from models import Hotel, Client, Stay
from rest_framework import viewsets
from api.serializers import ClientSerializer, HotelSerializer, StaySerializer


class ClientViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows hotel's clients to be viewed or edited.
    """
    queryset = Client.objects.all().order_by('-created')
    serializer_class = ClientSerializer


class HotelViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Hotel.objects.all()
    serializer_class = HotelSerializer


class StayViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Stay.objects.all()
    serializer_class = StaySerializer