This repository was archived by the owner on May 12, 2023. It is now read-only.
Open
Conversation
… to ecommerce/urls.py
oguzhancvdr
reviewed
Dec 11, 2021
| ### Payments | ||
|
|
||
| It contains bank model and bank account model. No newline at end of file | ||
| ## All models' serializers, filters, viewsets was created, these are; |
There was a problem hiding this comment.
- 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 | ||
|
|
There was a problem hiding this comment.
- 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) |
There was a problem hiding this comment.
Customer ile Address arasında 1-M ilişki var. address modelinin customers adında bir fieldı yok.
upy
suggested changes
Dec 11, 2021
|
|
||
|
|
||
| class BasketFilter(filters.FilterSet): | ||
| name = filters.CharFilter(label=_("Name"), method="") |
|
|
||
| class Meta: | ||
| model = BasketItem | ||
| fields = ("basket", "product","quantity","price" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All models' serializers, filters, viewsets was created, these are;
Also all models' serializer roots was created at the ecommerce/urls.py
Pagination was added to ecommerce/settings.py