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

Conversation

@Ertugrulbal
Copy link

Register and ProductCreate endpoints are created. And I controlled permissions all models.

Copy link
Owner

@upy upy left a comment

Choose a reason for hiding this comment

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

Baskete urun ekleme ile ilgili bir calisma goremedim.


class Meta:
model = Customer
fields =("id", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined")
Copy link
Owner

Choose a reason for hiding this comment

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

register yapilirken "is_staff", "is_active", "date_joined" bu bilgiler fazla bunlari silmemizde fayda var.

Copy link
Owner

Choose a reason for hiding this comment

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

ve password bilgisini almaliyiz.

return obj
class RegisterViewSet(mixins.CreateModelMixin,GenericViewSet ):
queryset = Customer.objects.all()
serializer_class = ProfileSerializer
Copy link
Owner

Choose a reason for hiding this comment

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

sanirim RegisterSerializer diyecektik?

model = Price
fields = ("id", "product", "amount")

class ProductCreateSerializer(serializers.ModelSerializer):
Copy link
Owner

Choose a reason for hiding this comment

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

bunu neden ekledigimizi anlamadim.

"detailed": ProductDetailedSerializer,
}

class ProductCreateViewSet(viewsets.ModelViewSet):
Copy link
Owner

Choose a reason for hiding this comment

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

bunu da neden ekledigimizi anlamadim

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