chore: blacked
This commit is contained in:
+12
-2
@@ -1,8 +1,18 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from unfold.admin import ModelAdmin
|
from unfold.admin import ModelAdmin
|
||||||
|
|
||||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
from shop.models import (
|
||||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
Brand,
|
||||||
|
Customer,
|
||||||
|
Order,
|
||||||
|
OrderLine,
|
||||||
|
Product,
|
||||||
|
ProductBatch,
|
||||||
|
ProductPrice,
|
||||||
|
Provider,
|
||||||
|
Tag,
|
||||||
|
Tax,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
|
|||||||
+12
-5
@@ -1,10 +1,17 @@
|
|||||||
from rest_framework.routers import DefaultRouter
|
from rest_framework.routers import DefaultRouter
|
||||||
|
|
||||||
from shop.api.v1.viewsets import (BrandViewSet, CustomerViewSet,
|
from shop.api.v1.viewsets import (
|
||||||
OrderLineViewSet, OrderViewSet,
|
BrandViewSet,
|
||||||
ProductBatchViewSet, ProductPriceViewSet,
|
CustomerViewSet,
|
||||||
ProductViewSet, ProviderViewSet, TagViewSet,
|
OrderLineViewSet,
|
||||||
TaxViewSet)
|
OrderViewSet,
|
||||||
|
ProductBatchViewSet,
|
||||||
|
ProductPriceViewSet,
|
||||||
|
ProductViewSet,
|
||||||
|
ProviderViewSet,
|
||||||
|
TagViewSet,
|
||||||
|
TaxViewSet,
|
||||||
|
)
|
||||||
|
|
||||||
app_name = "shop"
|
app_name = "shop"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from files.api.v1.serializers import (FileUploadSerializer,
|
from files.api.v1.serializers import FileUploadSerializer, NoIDFileUploadSerializer
|
||||||
NoIDFileUploadSerializer)
|
from shop.models import (
|
||||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
Brand,
|
||||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
Customer,
|
||||||
|
Order,
|
||||||
|
OrderLine,
|
||||||
|
Product,
|
||||||
|
ProductBatch,
|
||||||
|
ProductPrice,
|
||||||
|
Provider,
|
||||||
|
Tag,
|
||||||
|
Tax,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TaxSerializer(serializers.ModelSerializer):
|
class TaxSerializer(serializers.ModelSerializer):
|
||||||
|
|||||||
+25
-8
@@ -9,18 +9,35 @@ from rest_framework.permissions import IsAdminUser
|
|||||||
from rest_framework.viewsets import ModelViewSet
|
from rest_framework.viewsets import ModelViewSet
|
||||||
|
|
||||||
from shop.api.v1.permissions import ProductPermissions, ProductPricePermissions
|
from shop.api.v1.permissions import ProductPermissions, ProductPricePermissions
|
||||||
from shop.api.v1.serializers import (BrandSerializer,
|
from shop.api.v1.serializers import (
|
||||||
|
BrandSerializer,
|
||||||
CreateProductPriceSerializer,
|
CreateProductPriceSerializer,
|
||||||
CreateProductSerializer,
|
CreateProductSerializer,
|
||||||
CustomerSerializer, ListProductSerializer,
|
CustomerSerializer,
|
||||||
OrderLineSerializer, OrderSerializer,
|
ListProductSerializer,
|
||||||
|
OrderLineSerializer,
|
||||||
|
OrderSerializer,
|
||||||
ProductBatchSerializer,
|
ProductBatchSerializer,
|
||||||
ProductPriceSerializer, ProductSerializer,
|
ProductPriceSerializer,
|
||||||
ProviderSerializer, TagSerializer,
|
ProductSerializer,
|
||||||
TaxSerializer, UpdateProductSerializer)
|
ProviderSerializer,
|
||||||
|
TagSerializer,
|
||||||
|
TaxSerializer,
|
||||||
|
UpdateProductSerializer,
|
||||||
|
)
|
||||||
from shop.filters import ProductFilter
|
from shop.filters import ProductFilter
|
||||||
from shop.models import (Brand, Customer, Order, OrderLine, Product,
|
from shop.models import (
|
||||||
ProductBatch, ProductPrice, Provider, Tag, Tax)
|
Brand,
|
||||||
|
Customer,
|
||||||
|
Order,
|
||||||
|
OrderLine,
|
||||||
|
Product,
|
||||||
|
ProductBatch,
|
||||||
|
ProductPrice,
|
||||||
|
Provider,
|
||||||
|
Tag,
|
||||||
|
Tax,
|
||||||
|
)
|
||||||
from shop.utils import delete_product_batch
|
from shop.utils import delete_product_batch
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -1,7 +1,12 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from tpv.views import (payment_accepted, payment_form, payment_rejected,
|
from tpv.views import (
|
||||||
transaction_created, webhook)
|
payment_accepted,
|
||||||
|
payment_form,
|
||||||
|
payment_rejected,
|
||||||
|
transaction_created,
|
||||||
|
webhook,
|
||||||
|
)
|
||||||
|
|
||||||
app_name = "tpv"
|
app_name = "tpv"
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ from typing import List
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.auth.password_validation import (get_password_validators,
|
from django.contrib.auth.password_validation import (
|
||||||
validate_password)
|
get_password_validators,
|
||||||
|
validate_password,
|
||||||
|
)
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from rest_framework.exceptions import ValidationError
|
from rest_framework.exceptions import ValidationError
|
||||||
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
|
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
from rest_framework_simplejwt.views import (token_obtain_pair, token_refresh,
|
from rest_framework_simplejwt.views import (
|
||||||
token_verify)
|
token_obtain_pair,
|
||||||
|
token_refresh,
|
||||||
|
token_verify,
|
||||||
|
)
|
||||||
|
|
||||||
from users.api.v1.views import change_password, retrieve_update_me
|
from users.api.v1.views import change_password, retrieve_update_me
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user