title: How can I grab the API parameter in a Django viewset?
body: <p>I am building a Django application that exposes a REST API by which users can query my application's models. I'm following the instructions <a href="http://www.django-rest-framework.org/tutorial/quickstart#testing-our-api"><strong>here</strong></a></p>
  
  <p>My Route looks like this in mySites url.py:</p>
  
  <pre><code>router.register(r'myObjects', views.MyObjectsViewSet)
  ....
  url(r'^api/', include(router.urls)),
  </code></pre>
  
  <p>My Serializer looks like this:</p>
  
  <pre><code>class MyObjectSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = MyObject
      fields = ('id', 'name',)
  </code></pre>
  
  <p>My Viewset looks like this:</p>
  
  <pre><code>class MyObjectsViewSet(viewsets.ModelViewSet):
      queryset = MyObjects.objects.all()
      serializer_class = MyObjectSerializer
  </code></pre>
  
  <p>When I hit the API /api/myObjects/ it gives me a listing of all the myObject models.
  When I hit the API /api/myObjects/60/ it gives me only the myObject with id == 60. 
  Great so far!</p>
  
  <p>However, I want to change the logic of MyObjectsViewSet() such that I can manipulate/change what it returns when I hit /api/myObjects/60/. So instead of doing <strong>MyObjects.objects.all()</strong> I want to do something more complex based on the myObject ID of 60. But how can I do that?? In this viewset, how can I grab that number 60? It is not passed in as an argument. But I really need it!</p>