mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	resort imports
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| from django.contrib import admin | ||||
|  | ||||
| from .models import StockItemLabel, StockLocationLabel, PartLabel | ||||
| from .models import PartLabel, StockItemLabel, StockLocationLabel | ||||
|  | ||||
|  | ||||
| class LabelAdmin(admin.ModelAdmin): | ||||
|   | ||||
| @@ -1,30 +1,27 @@ | ||||
| from io import BytesIO | ||||
| from PIL import Image | ||||
|  | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|  | ||||
| from django.conf import settings | ||||
| from django.urls import include, re_path | ||||
| from django.core.exceptions import ValidationError, FieldError | ||||
| from django.core.exceptions import FieldError, ValidationError | ||||
| from django.http import HttpResponse, JsonResponse | ||||
| from django.urls import include, re_path | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|  | ||||
| from django_filters.rest_framework import DjangoFilterBackend | ||||
|  | ||||
| from rest_framework import generics, filters | ||||
| from PIL import Image | ||||
| from rest_framework import filters, generics | ||||
| from rest_framework.response import Response | ||||
|  | ||||
| import common.models | ||||
| import InvenTree.helpers | ||||
| from InvenTree.tasks import offload_task | ||||
| import common.models | ||||
|  | ||||
| from plugin.registry import registry | ||||
|  | ||||
| from stock.models import StockItem, StockLocation | ||||
| from part.models import Part | ||||
| from plugin.base.label import label as plugin_label | ||||
| from plugin.registry import registry | ||||
| from stock.models import StockItem, StockLocation | ||||
|  | ||||
| from .models import StockItemLabel, StockLocationLabel, PartLabel | ||||
| from .serializers import StockItemLabelSerializer, StockLocationLabelSerializer, PartLabelSerializer | ||||
| from .models import PartLabel, StockItemLabel, StockLocationLabel | ||||
| from .serializers import (PartLabelSerializer, StockItemLabelSerializer, | ||||
|                           StockLocationLabelSerializer) | ||||
|  | ||||
|  | ||||
| class LabelListView(generics.ListAPIView): | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import hashlib | ||||
| import logging | ||||
| import os | ||||
| import shutil | ||||
| import logging | ||||
| import hashlib | ||||
| import warnings | ||||
|  | ||||
| from django.apps import AppConfig | ||||
| @@ -10,7 +10,6 @@ from django.core.exceptions import AppRegistryNotReady | ||||
|  | ||||
| from InvenTree.ready import canAppAccessDatabase | ||||
|  | ||||
|  | ||||
| logger = logging.getLogger("inventree") | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -2,28 +2,24 @@ | ||||
| Label printing models | ||||
| """ | ||||
|  | ||||
| import sys | ||||
| import os | ||||
| import logging | ||||
| import datetime | ||||
| import logging | ||||
| import os | ||||
| import sys | ||||
|  | ||||
| from django.conf import settings | ||||
| from django.db import models | ||||
| from django.urls import reverse | ||||
| from django.core.exceptions import FieldError, ValidationError | ||||
| from django.core.validators import FileExtensionValidator, MinValueValidator | ||||
| from django.core.exceptions import ValidationError, FieldError | ||||
|  | ||||
| from django.template import Template, Context | ||||
| from django.db import models | ||||
| from django.template import Context, Template | ||||
| from django.template.loader import render_to_string | ||||
|  | ||||
| from django.urls import reverse | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|  | ||||
| from InvenTree.helpers import validateFilterString, normalize | ||||
|  | ||||
| import common.models | ||||
| import stock.models | ||||
| import part.models | ||||
|  | ||||
| import stock.models | ||||
| from InvenTree.helpers import normalize, validateFilterString | ||||
|  | ||||
| try: | ||||
|     from django_weasyprint import WeasyTemplateResponseMixin | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| from InvenTree.serializers import InvenTreeModelSerializer | ||||
| from InvenTree.serializers import InvenTreeAttachmentSerializerField | ||||
| from InvenTree.serializers import (InvenTreeAttachmentSerializerField, | ||||
|                                    InvenTreeModelSerializer) | ||||
|  | ||||
| from .models import StockItemLabel, StockLocationLabel, PartLabel | ||||
| from .models import PartLabel, StockItemLabel, StockLocationLabel | ||||
|  | ||||
|  | ||||
| class StockItemLabelSerializer(InvenTreeModelSerializer): | ||||
|   | ||||
| @@ -2,18 +2,18 @@ | ||||
|  | ||||
| import os | ||||
|  | ||||
| from django.conf import settings | ||||
| from django.apps import apps | ||||
| from django.urls import reverse | ||||
| from django.conf import settings | ||||
| from django.core.exceptions import ValidationError | ||||
| from django.urls import reverse | ||||
|  | ||||
| from InvenTree.helpers import validateFilterString | ||||
| from InvenTree.api_tester import InvenTreeAPITestCase | ||||
|  | ||||
| from .models import StockItemLabel, StockLocationLabel, PartLabel | ||||
| from InvenTree.helpers import validateFilterString | ||||
| from part.models import Part | ||||
| from stock.models import StockItem | ||||
|  | ||||
| from .models import PartLabel, StockItemLabel, StockLocationLabel | ||||
|  | ||||
|  | ||||
| class LabelTest(InvenTreeAPITestCase): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user