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

BeyzaaKoroglu - Homework 4 #101

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

BeyzaaKoroglu
Copy link
Contributor

No description provided.

}

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=True, methods=['post'], http_method_names=['post'])
def add_product(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.

user = self.request.user
return queryset.filter(basket__customer=user)

@action(detail=True, methods=['post'], http_method_names=['post'])
Copy link
Owner

Choose a reason for hiding this comment

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

bu viewset icinde detail=True olmamali sanki? cunku zaten create etmeye calisiyoruz.


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.

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