Make supplier part list API searchable

This commit is contained in:
Oliver Walters 2019-05-24 21:33:45 +10:00
parent 632be8f04f
commit d5da93b9d0
2 changed files with 9 additions and 0 deletions

View File

@ -113,6 +113,14 @@ class SupplierPartList(generics.ListCreateAPIView):
'supplier'
]
search_fields = [
'SKU',
'supplier__name',
'manufacturer',
'description',
'MPN',
]
class SupplierPartDetail(generics.RetrieveUpdateDestroyAPIView):
""" API endpoint for detail view of SupplierPart object

View File

@ -85,6 +85,7 @@ class SupplierPartSerializer(serializers.ModelSerializer):
'supplier_logo',
'SKU',
'manufacturer',
'description',
'MPN',
'URL',
'pricing',