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

Conversation

@Ertugrulbal
Copy link

All models' serializers, filters, viewsets was created, these are;

1- Baskets
2- Customers
3- Orders
4- Payments
5- Products

Also all models' serializer roots was created at the ecommerce/urls.py

Pagination was added to ecommerce/settings.py

### Payments

It contains bank model and bank account model.
## All models' serializers, filters, viewsets was created, these are;

Choose a reason for hiding this comment

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

  • I am a bit confused here, because these kind of information should'nt be added on README.md file, because you can alrady mention this infos in your commit and when you create a PR you can leave these information as a comment

class BasketItemViewSet(DetailedViewSetMixin, viewsets.ModelViewSet):
queryset = BasketItem.objects.all()
serializer_class = BasketItemSerializer

Choose a reason for hiding this comment

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

  • I don't know these detailed views works as expected but maybe you can add code blocks in your detailed views;
serializer_action_classes = {
       "detailed_list": BasketDetailedSerializer,
       "detailed": BasketDetailedSerializer,
   }

serializer = CustomerSerializer(data=addresses, many=True)
serializer.is_valid(raise_exception=True)
serializer.save()
address.customers.add(*serializer.instance)

Choose a reason for hiding this comment

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

Customer ile Address arasında 1-M ilişki var. address modelinin customers adında bir fieldı yok.



class BasketFilter(filters.FilterSet):
name = filters.CharFilter(label=_("Name"), method="")
Copy link
Owner

Choose a reason for hiding this comment

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

eksik kalmis sanki?


class Meta:
model = BasketItem
fields = ("basket", "product","quantity","price" )
Copy link
Owner

Choose a reason for hiding this comment

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

id eklememizde fayda 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.

4 participants