from django.shortcuts import render
from .models import Staff
from .serializers import StaffSerializers
from rest_framework import mixins
from rest_framework import generics

# Create your views here.

class StaffAPI(mixins.ListModelMixin,mixins.CreateModelMixin,generics.GenericAPIView):
    queryset = Staff.objects.all()
    serializer_class = StaffSerializers

    lookup_filed = 'staff_id'

    def get(sef, request, staff_id = None):
        if staff_id:
            return sef.retrieve(request)
        else:
            return  sef.list(request)
2d99e4e234993315f2b6d5f27807c33b7ffc12ee
<mask token>


class StaffAPI(mixins.ListModelMixin, mixins.CreateModelMixin, generics.
    GenericAPIView):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class StaffAPI(mixins.ListModelMixin, mixins.CreateModelMixin, generics.
    GenericAPIView):
    <mask token>
    <mask token>
    <mask token>

    def get(sef, request, staff_id=None):
        if staff_id:
            return sef.retrieve(request)
        else:
            return sef.list(request)

<mask token>


class StaffAPI(mixins.ListModelMixin, mixins.CreateModelMixin, generics.
    GenericAPIView):
    queryset = Staff.objects.all()
    serializer_class = StaffSerializers
    lookup_filed = 'staff_id'

    def get(sef, request, staff_id=None):
        if staff_id:
            return sef.retrieve(request)
        else:
            return sef.list(request)

from django.shortcuts import render
from .models import Staff
from .serializers import StaffSerializers
from rest_framework import mixins
from rest_framework import generics


class StaffAPI(mixins.ListModelMixin, mixins.CreateModelMixin, generics.
    GenericAPIView):
    queryset = Staff.objects.all()
    serializer_class = StaffSerializers
    lookup_filed = 'staff_id'

    def get(sef, request, staff_id=None):
        if staff_id:
            return sef.retrieve(request)
        else:
            return sef.list(request)

from django.shortcuts import render
from .models import Staff
from .serializers import StaffSerializers
from rest_framework import mixins
from rest_framework import generics

# Create your views here.

class StaffAPI(mixins.ListModelMixin,mixins.CreateModelMixin,generics.GenericAPIView):
    queryset = Staff.objects.all()
    serializer_class = StaffSerializers

    lookup_filed = 'staff_id'

    def get(sef, request, staff_id = None):
        if staff_id:
            return sef.retrieve(request)
        else:
            return  sef.list(request)