mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
more api fixes
This commit is contained in:
parent
e0f86db664
commit
2f3e29ab13
@ -7,6 +7,8 @@ from .serializers import ProjectPartSerializer
|
||||
|
||||
|
||||
class ProjectDetail(generics.RetrieveUpdateAPIView):
|
||||
""" Project details
|
||||
"""
|
||||
|
||||
queryset = Project.objects.all()
|
||||
serializer_class = ProjectSerializer
|
||||
@ -25,7 +27,7 @@ class NewProjectCategory(generics.CreateAPIView):
|
||||
"""
|
||||
serializer_class = ProjectCategoryDetailSerializer
|
||||
permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
|
||||
|
||||
|
||||
|
||||
class ProjectCategoryDetail(generics.RetrieveUpdateAPIView):
|
||||
|
||||
|
@ -10,5 +10,6 @@ urlpatterns = [
|
||||
url(r'^location/(?P<pk>[0-9]+)$', views.LocationDetail.as_view()),
|
||||
|
||||
# List all top-level locations
|
||||
url(r'^location/$', views.LocationList.as_view())
|
||||
url(r'^location/$', views.LocationList.as_view()),
|
||||
url(r'^$', views.LocationList.as_view())
|
||||
]
|
||||
|
@ -5,7 +5,7 @@ from .models import StockLocation, StockItem
|
||||
from .serializers import StockItemSerializer, LocationDetailSerializer
|
||||
|
||||
|
||||
class PartStockDetail(generics.ListAPIView):
|
||||
class PartStockDetail(generics.ListCreateAPIView):
|
||||
""" Return a list of all stockitems for a given part
|
||||
"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user