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

Homework-4 #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Homework-4 #108

wants to merge 1 commit into from

Conversation

Naoiss
Copy link

@Naoiss Naoiss commented Dec 19, 2021

Register endpoints added, add to basket function added


@action(detail=True, methods=['post'])
def add_item_to_basket(self, request, pk=None):
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 bir fikir degil sanki.

serializer = BasketItemSerializer(data=request.data)
serializer.save()

return Response(serializer.data)
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.



class CustomerRegisterViewSet(viewsets.ModelViewSet, mixins.CreateModelMixin):
permission_classes = ()
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 kullanici bu endpointe ulasamasa iyi olur sanki.

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