-
Notifications
You must be signed in to change notification settings - Fork 32
BeyzaaKoroglu - Homework 4 #101
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
def get_queryset(self): | ||
queryset = super().get_queryset() | ||
user = self.request.user |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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']) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
No description provided.