Skip to content
This repository was archived by the owner on May 12, 2023. It is now read-only.

Conversation

@ozon-uk
Copy link

@ozon-uk ozon-uk commented Dec 19, 2021

  • Customer Registration feature API implemented
  • Add to Basket feature API implemented
  • Permissions and get_queryset added for necessary viewsets
  • README.md updated


def get_queryset(self):
queryset = super().get_queryset()
user = self.request.user
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

login olmamis bir customer varsa sanki problem var.


@action(detail=False, methods=['post'])
def add_to_basket(self, request):
serializer = BasketItemSerializer(data=request.data)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

price bilgisini kullanicidan almak guzel gozukmuyor.

if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basketviewset baskete ait bir serializer verisi donse daha guzel olur.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants