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