mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 02:25:38 +00:00
Add API endpoint for querying part images
This commit is contained in:
@ -30,6 +30,16 @@ class CategorySerializer(InvenTreeModelSerializer):
|
||||
]
|
||||
|
||||
|
||||
class PartThumbSerializer(serializers.Serializer):
|
||||
"""
|
||||
Serializer for the 'image' field of the Part model.
|
||||
Used to serve and display existing Part images.
|
||||
"""
|
||||
|
||||
image = serializers.URLField(read_only=True)
|
||||
count = serializers.IntegerField(read_only=True)
|
||||
|
||||
|
||||
class PartBriefSerializer(InvenTreeModelSerializer):
|
||||
""" Serializer for Part (brief detail) """
|
||||
|
||||
|
Reference in New Issue
Block a user