You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was trying to perform bulk update using django-bulk-update
**https://github.com/aykut/django-bulk-update**
But it throws KeyError at /api/update 'id'
views
class CartUpdatesView(ListBulkCreateUpdateDestroyAPIView):
queryset=models.Cart.objects.all()
serializer_class=serializers.CartUpdatesSerializer
serializers
class CartUpdatesSerializer(BulkSerializerMixin,serializers.ModelSerializer):
class Meta(object):
model = models.Cart
fields = '__all__'
list_serializer_class=BulkListSerializer
models
class Cart(models.Model):
cart_id=models.AutoField(primary_key=True)
product_qty=models.IntegerField()
customer_id=models.IntegerField()
product_id=models.ForeignKey('Products',db_column='product_id',on_delete=models.CASCADE)
Does this happens because of 2 primary keys while joiing tables?. I dont have any idea on bulk update. By searching I figure out official doc provide only very little information on bulk update and everyone refers to use this package.
i was trying to perform bulk update using django-bulk-update
But it throws KeyError at /api/update 'id'
views
serializers
models
Does this happens because of 2 primary keys while joiing tables?. I dont have any idea on bulk update. By searching I figure out official doc provide only very little information on bulk update and everyone refers to use this package.
GET
PUT
Traceback
The text was updated successfully, but these errors were encountered: