🚨 format python code using black
This commit is contained in:
1 parent
9c4a5b3d84
commit
a052397990
24 files changed
+643
-407
No files matched your search
+2
-5
@@ -7,16 +7,13 @@ from main.models import Product
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
||||
|
||||
class ProductViewSet(mixins.ListModelMixin,
|
||||
mixins.RetrieveModelMixin,
|
||||
GenericViewSet):
|
||||
class ProductViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, GenericViewSet):
|
||||
serializer_class = ProductSerializer
|
||||
queryset = Product.objects.all()
|
||||
|
||||
@action(detail=False, methods=['get'])
|
||||
@action(detail=False, methods=["get"])
|
||||
def group_by_user(self, request):
|
||||
products = self.get_queryset().filter(active=True)
|
||||
serializer = ProductStatSerializer(products, many=True)
|
||||
|
||||
return Response(serializer.data)
|
||||
|
||||
Reference in new issue
Block a user