I am using <http://www.django-rest-framework.org/>

I have the scenario where I want to pass two or more variables based on that I need to fetch data from database. In the following code only pk is there which I want to replace with two other fields in database.

Also please suggest how can I write my urlconfig the same.

Views.py

```
class ExampleViewSet(viewsets.ReadOnlyModelViewSet):
    model = myTable
    def list(self, request):
        queryset = myTable.objects.all()
        serializer = mySerializer(queryset, many=True)
        return Response(serializer.data)
    def retrieve(self, request, pk=None):
        queryset = myTable.objects.all()
        s = get_object_or_404(queryset, pk=pk)
        serializer = mySerializer(s)
        return Response(serializer.data)

```

Serializer.py 

```
class Serializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = myTable
        fields = ('attr1', 'attr2', 'attr3')

```