Creating shopping cart views

Now that we have a Cart class to manage the cart, we need to create the views to add, update, or remove items from it. We need to create the following views:

  • A view to add or update items in a cart, which can handle current and new quantities
  • A view to remove items from the cart
  • A view to display cart items and totals

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.