title: how to make shopping cart using django
body: <p>I'm making a shopping cart with two class models, one user can order multiple products
  I used the many-to-many relationships. but I'm facing some issues like if two users has order same product then the last user's selected qty will show in both user's order. and many times it shows all orders in the user's cart by default.
  please tell the correct way to write these models. So each users cart can't affect others </p>
  
  <pre><code>class OrderItem(models.Model):
      id = models.AutoField(primary_key=True)
      product = models.OneToOneField(Product, on_delete=models.SET_NULL, null=True)
      is_ordered = models.BooleanField(default=False)
      date_added = models.DateTimeField(auto_now=True)
      qty = models.IntegerField(default=1)
      def __str__(self):
          return self.product.Productname
  
  class Cart(models.Model):
      owner = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
      is_ordered = models.BooleanField(default=False)
      items = models.ManyToManyField(OrderItem, default=None, blank=True)
  </code></pre>