title: What base_name parameter do I need in my route to make this Django API work?
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 myApp's url.py:</p>
  
  <pre><code>from rest_framework import routers
  router = routers.DefaultRouter()    router.register(r'myObjects/(?P&lt;id&gt;\d+)/?$', views.MyObjectsViewSet)
  url(r'^api/', include(router.urls)),
  </code></pre>
  
  <p>My Model looks like this:</p>
  
  <pre><code>class MyObject(models.Model):
      name = models.TextField()
  </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.ViewSet):
  
      def retrieve(self,request,pk=None):
          queryset = MyObjects.objects.get(pk=pk).customMyObjectList()
  
          if not queryset:
              return Response(status=status.HTTP_400_BAD_REQUEST)
          else:
              serializer = MyObjectSerializer(queryset)
              return Response(serializer.data,status=status.HTTP_200_OK)
  </code></pre>
  
  <p>When I hit /api/myObjects/60/ I get the following error:</p>
  
  <blockquote>
    <p><code>base_name</code> argument not specified, and could not automatically determine the name from the viewset, as it does not have a <code>.model</code> or <code>.queryset</code> attribute.</p>
  </blockquote>
  
  <p>I understand from <a href="http://www.django-rest-framework.org/api-guide/routers"><strong>here</strong></a> that I need a base_name parameter on my route. But from the docs, it is unclear to me what that value of that base_name parameter should be. Can someone please tell me what the route should look like with the base_name?</p>