Actually I'm working on a project.I want to get data by status field not by id which is created in models.py in Django rest framework.
Here this is my scource code  

**Models.py file**

```
class employee(models.Model):
    name = models.CharField(max_length=50)
    salary = models.IntegerField()
    phone = models.CharField(max_length=20)
    address = models.CharField(max_length=250)
    status = models.CharField(max_length=20)

```

> 
> 

**Views.py** file

```
class employeeviewset(viewsets.ModelViewSet):
   queryset = models.employee.objects.all()
   serializer_class = serializers.employeeserializer
class employeebystatus(viewsets.ModelViewSet):
   def get(self, request, status):
       employee = models.employee.objects.filter(status=status)
       if employee:
           serializer = serializers.employeeserializer(employee, many=True)
           return Response(status=200, data=serializer.data)
       return Response(status=400, data={'Employee Not Found'})

```

> 
> 

**Urls.py**file

```
router = routers.DefaultRouter()
router.register('employee/<status>/', employeeviewset)

```

How to get data by status field using queries can any one tell me the answer