mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-09 07:00:56 +00:00
Revert to bootstrap-treeview
- More "bootstrappy" design - Already in code base - Cleaner API
This commit is contained in:
@ -240,12 +240,21 @@ class CategoryParameterList(generics.ListAPIView):
|
||||
|
||||
|
||||
class CategoryTree(generics.ListAPIView):
|
||||
""" API endpoint for accessing a list of PartCategory objects ready for rendering a jstree.
|
||||
"""
|
||||
API endpoint for accessing a list of PartCategory objects ready for rendering a tree.
|
||||
"""
|
||||
|
||||
queryset = PartCategory.objects.all()
|
||||
serializer_class = part_serializers.CategoryTree
|
||||
|
||||
filter_backends = [
|
||||
DjangoFilterBackend,
|
||||
filters.OrderingFilter,
|
||||
]
|
||||
|
||||
# Order by tree level (top levels first) and then name
|
||||
ordering = ['level', 'name']
|
||||
|
||||
|
||||
class PartSalePriceList(generics.ListCreateAPIView):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user