mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Delete un-needed code
This commit is contained in:
parent
04dbfbd892
commit
34def10765
@ -8,7 +8,6 @@ from __future__ import unicode_literals
|
|||||||
from django_filters.rest_framework import DjangoFilterBackend
|
from django_filters.rest_framework import DjangoFilterBackend
|
||||||
from rest_framework import filters
|
from rest_framework import filters
|
||||||
from rest_framework import generics
|
from rest_framework import generics
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
|
|
||||||
@ -29,8 +28,6 @@ class BuildList(generics.ListCreateAPIView):
|
|||||||
queryset = Build.objects.all()
|
queryset = Build.objects.all()
|
||||||
serializer_class = BuildSerializer
|
serializer_class = BuildSerializer
|
||||||
|
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
filter_backends = [
|
filter_backends = [
|
||||||
DjangoFilterBackend,
|
DjangoFilterBackend,
|
||||||
filters.SearchFilter,
|
filters.SearchFilter,
|
||||||
|
@ -8,7 +8,6 @@ from __future__ import unicode_literals
|
|||||||
from django_filters.rest_framework import DjangoFilterBackend
|
from django_filters.rest_framework import DjangoFilterBackend
|
||||||
from rest_framework import filters
|
from rest_framework import filters
|
||||||
from rest_framework import generics
|
from rest_framework import generics
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
@ -33,7 +32,6 @@ class CompanyList(generics.ListCreateAPIView):
|
|||||||
|
|
||||||
serializer_class = CompanySerializer
|
serializer_class = CompanySerializer
|
||||||
queryset = Company.objects.all()
|
queryset = Company.objects.all()
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ from __future__ import unicode_literals
|
|||||||
from django_filters.rest_framework import DjangoFilterBackend
|
from django_filters.rest_framework import DjangoFilterBackend
|
||||||
from rest_framework import generics
|
from rest_framework import generics
|
||||||
from rest_framework import filters
|
from rest_framework import filters
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
|
|
||||||
@ -37,7 +36,6 @@ class POList(generics.ListCreateAPIView):
|
|||||||
|
|
||||||
queryset = PurchaseOrder.objects.all()
|
queryset = PurchaseOrder.objects.all()
|
||||||
serializer_class = POSerializer
|
serializer_class = POSerializer
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
def get_serializer(self, *args, **kwargs):
|
def get_serializer(self, *args, **kwargs):
|
||||||
|
|
||||||
@ -240,7 +238,6 @@ class SOList(generics.ListCreateAPIView):
|
|||||||
|
|
||||||
queryset = SalesOrder.objects.all()
|
queryset = SalesOrder.objects.all()
|
||||||
serializer_class = SalesOrderSerializer
|
serializer_class = SalesOrderSerializer
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
def get_serializer(self, *args, **kwargs):
|
def get_serializer(self, *args, **kwargs):
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ from django_filters.rest_framework import DjangoFilterBackend
|
|||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.db.models import Q, F, Count, Prefetch, Sum
|
from django.db.models import Q, F, Count, Prefetch, Sum
|
||||||
|
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
from rest_framework import filters, serializers
|
from rest_framework import filters, serializers
|
||||||
@ -372,8 +371,6 @@ class PartList(generics.ListCreateAPIView):
|
|||||||
|
|
||||||
starred_parts = None
|
starred_parts = None
|
||||||
|
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
def get_serializer(self, *args, **kwargs):
|
def get_serializer(self, *args, **kwargs):
|
||||||
|
|
||||||
# Ensure the request context is passed through
|
# Ensure the request context is passed through
|
||||||
|
@ -40,7 +40,6 @@ from decimal import Decimal, InvalidOperation
|
|||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from rest_framework.pagination import LimitOffsetPagination
|
|
||||||
from rest_framework.serializers import ValidationError
|
from rest_framework.serializers import ValidationError
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
@ -338,8 +337,6 @@ class StockList(generics.ListCreateAPIView):
|
|||||||
serializer_class = StockItemSerializer
|
serializer_class = StockItemSerializer
|
||||||
queryset = StockItem.objects.all()
|
queryset = StockItem.objects.all()
|
||||||
|
|
||||||
pagination_class = LimitOffsetPagination
|
|
||||||
|
|
||||||
def create(self, request, *args, **kwargs):
|
def create(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Create a new StockItem object via the API.
|
Create a new StockItem object via the API.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user