mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Add part-list API
- Deleted some old serializers - Simply list of parts - Search by name / description - Orderable by name
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django_filters.rest_framework import FilterSet, DjangoFilterBackend
|
||||
from rest_framework import filters
|
||||
|
||||
from rest_framework import generics, permissions
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from .models import Company
|
||||
from .serializers import CompanySerializer
|
||||
|
||||
|
||||
|
||||
|
||||
class CompanyList(generics.ListCreateAPIView):
|
||||
|
||||
serializer_class = CompanySerializer
|
||||
@ -25,14 +26,14 @@ class CompanyList(generics.ListCreateAPIView):
|
||||
]
|
||||
|
||||
filter_fields = [
|
||||
'name',
|
||||
'is_customer',
|
||||
'is_supplier',
|
||||
'name',
|
||||
'is_customer',
|
||||
'is_supplier',
|
||||
]
|
||||
|
||||
search_fields = [
|
||||
'name',
|
||||
'description',
|
||||
'name',
|
||||
'description',
|
||||
]
|
||||
|
||||
ordering_fields = [
|
||||
|
Reference in New Issue
Block a user