🚨 Add pre-commit
Format code Add bin/run
This commit is contained in:
1 parent
9d3afadbff
commit
dcd8edaaa6
28 files changed
+264
-51
No files matched your search
+1
-1
@@ -18,5 +18,5 @@ class FieldError(Error):
|
||||
@strawberry.type
|
||||
class FormErrors:
|
||||
fields: list[FieldError]
|
||||
message: str = ''
|
||||
message: str = ""
|
||||
error: bool = True
|
||||
@@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404
|
||||
from strawberry import ID
|
||||
|
||||
from main import models
|
||||
from main.api.errors import Error, FormErrors, FieldError
|
||||
from main.api.errors import Error, FieldError, FormErrors
|
||||
from main.api.types import Order, Transaction, UserProfile
|
||||
|
||||
UserModel = get_user_model()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import strawberry
|
||||
import strawberry_django
|
||||
|
||||
from main.api import mutations
|
||||
from main.api.types import Product, User, Order
|
||||
from main.api.types import Order, Product, User
|
||||
|
||||
|
||||
@strawberry.type
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from django.db.models import Sum, Count
|
||||
from django.db.models import Count, Sum
|
||||
from rest_framework import serializers
|
||||
from rest_framework.serializers import ModelSerializer
|
||||
|
||||
from main.models import Product, OrderLine, Order
|
||||
from main.models import Order, OrderLine, Product
|
||||
|
||||
|
||||
class ProductSerializer(ModelSerializer):
|
||||
|
||||
+1
-1
@@ -1,10 +1,10 @@
|
||||
from rest_framework import mixins
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
||||
from main.api.serializers import ProductSerializer, ProductStatSerializer
|
||||
from main.models import Product
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
||||
|
||||
class ProductViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, GenericViewSet):
|
||||
|
||||
Reference in new issue
Block a user