I am interested in designing a DRF view based class where the user may search for one or more objects but the search param may not exactly match the backing database value. For instance, in a purchase order application, it is easier for the user to search "PO-12345" but the database only stores 12345. Something like this is currently working but it is not scaleable (i.e., it is not easy to search for multiple purchase orders at one time) class PurchaseOrderViewSet(ReadOnlyModelViewSet): queryset = PurchaseOrder.objects.all() lookup_field = "po" def get_object(self): po_num = self.kwargs.get("pk").replace("PO-", "") self.kwargs = {"po": po_num} return super().get_object() Does DRF provide a way to map/adjust the query in an easier manner? Continue reading...