# THIRD-PARTY IMPORTS
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated, DjangoModelPermissions
from rest_framework import mixins

# URBVAN IMPORTS
from urbvan_framework.views import (
    ListCreateView,
    RetrieveUpdateDeleteView,
)
from urbvan_framework.authentication import CustomTokenAuthentication
from urbvan_framework.permissions import IsManagerOrReadOnly
from .serializers import (
    LineModelSerializer,
    RouteModelSerializer,
)
from ..models import (
    LineModel,
    RouteModel,
)
from .schemas import LineSchema, RouteSchema


class LineView(ListCreateView):

    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer


class LineDetailView(RetrieveUpdateDeleteView):
    '''
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    '''
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = (IsManagerOrReadOnly, )


class RouteView(ListCreateView):

    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    '''
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    '''
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = (IsManagerOrReadOnly, )

12f854721c770b6583a0e7c8772ff2088d3bafa8
<mask token>


class LineDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    """
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = IsManagerOrReadOnly,


class RouteView(ListCreateView):
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    """
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = IsManagerOrReadOnly,

<mask token>


class LineView(ListCreateView):
    <mask token>
    <mask token>
    <mask token>


class LineDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    """
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = IsManagerOrReadOnly,


class RouteView(ListCreateView):
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    """
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = IsManagerOrReadOnly,

<mask token>


class LineView(ListCreateView):
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer


class LineDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    """
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = IsManagerOrReadOnly,


class RouteView(ListCreateView):
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    """
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = IsManagerOrReadOnly,

from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated, DjangoModelPermissions
from rest_framework import mixins
from urbvan_framework.views import ListCreateView, RetrieveUpdateDeleteView
from urbvan_framework.authentication import CustomTokenAuthentication
from urbvan_framework.permissions import IsManagerOrReadOnly
from .serializers import LineModelSerializer, RouteModelSerializer
from ..models import LineModel, RouteModel
from .schemas import LineSchema, RouteSchema


class LineView(ListCreateView):
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer


class LineDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    """
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = IsManagerOrReadOnly,


class RouteView(ListCreateView):
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    """
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    """
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = IsManagerOrReadOnly,

# THIRD-PARTY IMPORTS
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated, DjangoModelPermissions
from rest_framework import mixins

# URBVAN IMPORTS
from urbvan_framework.views import (
    ListCreateView,
    RetrieveUpdateDeleteView,
)
from urbvan_framework.authentication import CustomTokenAuthentication
from urbvan_framework.permissions import IsManagerOrReadOnly
from .serializers import (
    LineModelSerializer,
    RouteModelSerializer,
)
from ..models import (
    LineModel,
    RouteModel,
)
from .schemas import LineSchema, RouteSchema


class LineView(ListCreateView):

    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer


class LineDetailView(RetrieveUpdateDeleteView):
    '''
        A viewset for retrieve, update and delete a Line
        @author Christian Buendia
    '''
    queryset = LineModel.objects.get_queryset().order_by('id')
    schema_class = LineSchema
    serializer_class = LineModelSerializer
    permission_classes = (IsManagerOrReadOnly, )


class RouteView(ListCreateView):

    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer


class RouteDetailView(RetrieveUpdateDeleteView):
    '''
        A viewset for retrieve, update and delete a Route
        @author Christian Buendia
    '''
    queryset = RouteModel.objects.get_queryset().order_by('id')
    schema_class = RouteSchema
    serializer_class = RouteModelSerializer
    permission_classes = (IsManagerOrReadOnly, )
