Hello,

I would like two types of URL :

   - /color_parts/test/ to list data object
   - /api/color_parts/pk1/pk2/ to retrieve data object.

So, I created MultipleFieldLookupMixin as your tutorial, list working but 
retrieve not working.
It take juste one lookup_fild (pk) but I want two lookups_field.


class :

class ColorPartViewSet(MultipleFieldLookupMixin,
                       viewsets.ReadOnlyModelViewSet):
    queryset = ColorPart.objects.all()
    serializer_class = ColorPartWithNumberInSetSerializer
    lookup_fields = ('part__part', 'color__color',)


rooter :
router.register(r'api/color_parts', ColorPartViewSet, 'color_parts')


Thank you in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to