mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add detail endpoints for the StockItemLabel and StockLocationLabel models
This commit is contained in:
parent
a0d1f95171
commit
44e60a705e
@ -131,6 +131,15 @@ class StockItemLabelList(LabelListView):
|
|||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
|
|
||||||
|
class StockItemLabelDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||||
|
"""
|
||||||
|
API endpoint for a single StockItemLabel object
|
||||||
|
"""
|
||||||
|
|
||||||
|
queryset = StockItemLabel.objects.all()
|
||||||
|
serializer_class = StockItemLabelSerializer
|
||||||
|
|
||||||
|
|
||||||
class StockLocationLabelList(LabelListView):
|
class StockLocationLabelList(LabelListView):
|
||||||
"""
|
"""
|
||||||
API endpoint for viewiing list of StockLocationLabel objects.
|
API endpoint for viewiing list of StockLocationLabel objects.
|
||||||
@ -225,15 +234,36 @@ class StockLocationLabelList(LabelListView):
|
|||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
|
|
||||||
|
class StockLocationLabelDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||||
|
"""
|
||||||
|
API endpoint for a single StockLocationLabel object
|
||||||
|
"""
|
||||||
|
|
||||||
|
queryset = StockLocationLabel.objects.all()
|
||||||
|
seiralizer_class = StockLocationLabelSerializer
|
||||||
|
|
||||||
|
|
||||||
label_api_urls = [
|
label_api_urls = [
|
||||||
|
|
||||||
# Stock item labels
|
# Stock item labels
|
||||||
url(r'stock/', include([
|
url(r'stock/', include([
|
||||||
|
# Detail views
|
||||||
|
url(r'^(?P<pk>\d+)/', include([
|
||||||
|
url(r'^.*$', StockItemLabelDetail.as_view(), name='api-stockitem-label-detail'),
|
||||||
|
])),
|
||||||
|
|
||||||
|
# List view
|
||||||
url(r'^.*$', StockItemLabelList.as_view(), name='api-stockitem-label-list'),
|
url(r'^.*$', StockItemLabelList.as_view(), name='api-stockitem-label-list'),
|
||||||
])),
|
])),
|
||||||
|
|
||||||
# Stock location labels
|
# Stock location labels
|
||||||
url(r'location/', include([
|
url(r'location/', include([
|
||||||
|
# Detail views
|
||||||
|
url(r'^(?P<pk>\d+)/', include([
|
||||||
|
url(r'^.*$', StockLocationLabelDetail.as_view(), name='api-stocklocation-label-detail'),
|
||||||
|
])),
|
||||||
|
|
||||||
|
# List view
|
||||||
url(r'^.*$', StockLocationLabelList.as_view(), name='api-stocklocation-label-list'),
|
url(r'^.*$', StockLocationLabelList.as_view(), name='api-stocklocation-label-list'),
|
||||||
])),
|
])),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user