title: Django REST framework - multiple lookup fields?
body: <p>I have a model that more or less looks like this:</p>
  
  <pre><code>class Starship(models.Model):
      id = models.UUIDField(default=uuid4, editable=False, primary_key=True)
      name = models.CharField(max_length=128)
      hull_no = models.CharField(max_length=12, unique=True)
  </code></pre>
  
  <p>I have an unremarkable <code>StarshipDetailSerialiser</code> and <code>StarshipListSerialiser</code> (I want to eventually show different fields but for now they're identical), both subclassing <code>serializers.ModelSerializer</code>. It has a <code>HyperlinkedIdentityField</code> that refers back to the (UU)ID, using a home-brew class very similar to the original <code>HyperlinkedIdentityField</code> but with capability to normalise and handle UUIDs: </p>
  
  <pre><code>class StarshipListSerializer(HyperlinkedModelSerializer):
  uri = UUIDHyperlinkedIdentityField(view_name='starships:starship-detail', format='html')
  
      class Meta:
           model = Starship
           fields = ('uri', 'name', 'hull_no')
  </code></pre>
  
  <p>Finally, there's a list view (a <code>ListAPIView</code>) and a detail view that looks like this:</p>
  
  <pre><code>class StarshipDetail(APIView):
      """
      Retrieves a single starship by UUID primary key.
      """
  
      def get_object(self, pk):
          try:
              return Starship.objects.get(pk=pk)
          except Starship.DoesNotExist:
              raise Http404
  
      def get(self, request, pk, format=None):
          vessel = self.get_object(pk)
          serializer = StarshipDetailSerialiser(vessel, context={'request': request})
          return Response(serializer.data)
  </code></pre>
  
  <p>The detail view's URL schema is currently invoking the view based on the UUID:</p>
  
  <pre><code>...
  url(r'vessels/id/(?P&lt;pk&gt;[0-9A-Fa-f\-]+)/$', StarshipDetail.as_view(), name='starship-detail'),
  ...
  </code></pre>
  
  <p>I now want users to be able to navigate and find the same vessel not just by UUID but also by their hull number, so that e.g. <code>vessels/id/abcde1345...and so on.../</code> and <code>vessels/hull/H1025/</code> would be able to resolve to the same entity. And ideally, regardless of whether one arrived at the detail view from ID or hull number, the serialiser, which is used with slight alterations in lists as well, should be able to have the ID hyperlinked to the ID-based link and the hull hyperlinked to a hull number based link (<code>vessels/hull/H1025/</code>). Is this at all possible? And if so, how would I go about it?</p>