chore: blacked
This commit is contained in:
+12
-2
@@ -1,8 +1,18 @@
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin
|
||||
|
||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
||||
from shop.models import (
|
||||
Brand,
|
||||
Customer,
|
||||
Order,
|
||||
OrderLine,
|
||||
Product,
|
||||
ProductBatch,
|
||||
ProductPrice,
|
||||
Provider,
|
||||
Tag,
|
||||
Tax,
|
||||
)
|
||||
|
||||
|
||||
# Register your models here.
|
||||
|
||||
+12
-5
@@ -1,10 +1,17 @@
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from shop.api.v1.viewsets import (BrandViewSet, CustomerViewSet,
|
||||
OrderLineViewSet, OrderViewSet,
|
||||
ProductBatchViewSet, ProductPriceViewSet,
|
||||
ProductViewSet, ProviderViewSet, TagViewSet,
|
||||
TaxViewSet)
|
||||
from shop.api.v1.viewsets import (
|
||||
BrandViewSet,
|
||||
CustomerViewSet,
|
||||
OrderLineViewSet,
|
||||
OrderViewSet,
|
||||
ProductBatchViewSet,
|
||||
ProductPriceViewSet,
|
||||
ProductViewSet,
|
||||
ProviderViewSet,
|
||||
TagViewSet,
|
||||
TaxViewSet,
|
||||
)
|
||||
|
||||
app_name = "shop"
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
from django.utils import timezone
|
||||
from rest_framework import serializers
|
||||
|
||||
from files.api.v1.serializers import (FileUploadSerializer,
|
||||
NoIDFileUploadSerializer)
|
||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
||||
from files.api.v1.serializers import FileUploadSerializer, NoIDFileUploadSerializer
|
||||
from shop.models import (
|
||||
Brand,
|
||||
Customer,
|
||||
Order,
|
||||
OrderLine,
|
||||
Product,
|
||||
ProductBatch,
|
||||
ProductPrice,
|
||||
Provider,
|
||||
Tag,
|
||||
Tax,
|
||||
)
|
||||
|
||||
|
||||
class TaxSerializer(serializers.ModelSerializer):
|
||||
|
||||
+28
-11
@@ -9,18 +9,35 @@ from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.viewsets import ModelViewSet
|
||||
|
||||
from shop.api.v1.permissions import ProductPermissions, ProductPricePermissions
|
||||
from shop.api.v1.serializers import (BrandSerializer,
|
||||
CreateProductPriceSerializer,
|
||||
CreateProductSerializer,
|
||||
CustomerSerializer, ListProductSerializer,
|
||||
OrderLineSerializer, OrderSerializer,
|
||||
ProductBatchSerializer,
|
||||
ProductPriceSerializer, ProductSerializer,
|
||||
ProviderSerializer, TagSerializer,
|
||||
TaxSerializer, UpdateProductSerializer)
|
||||
from shop.api.v1.serializers import (
|
||||
BrandSerializer,
|
||||
CreateProductPriceSerializer,
|
||||
CreateProductSerializer,
|
||||
CustomerSerializer,
|
||||
ListProductSerializer,
|
||||
OrderLineSerializer,
|
||||
OrderSerializer,
|
||||
ProductBatchSerializer,
|
||||
ProductPriceSerializer,
|
||||
ProductSerializer,
|
||||
ProviderSerializer,
|
||||
TagSerializer,
|
||||
TaxSerializer,
|
||||
UpdateProductSerializer,
|
||||
)
|
||||
from shop.filters import ProductFilter
|
||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
||||
from shop.models import (
|
||||
Brand,
|
||||
Customer,
|
||||
Order,
|
||||
OrderLine,
|
||||
Product,
|
||||
ProductBatch,
|
||||
ProductPrice,
|
||||
Provider,
|
||||
Tag,
|
||||
Tax,
|
||||
)
|
||||
from shop.utils import delete_product_batch
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user