11

Implementing Order and Item Models

In the previous chapter, we implemented the shopping cart system and allowed users to add movies to the cart. To enable users to purchase movies, we need to store additional information in the database, specifically to store order and item information. In this chapter, we will implement the order and item models and establish a connection between them.

In this chapter, we will be covering the following topics:

  • Analyzing store invoices
  • Creating the order model
  • Creating the item model
  • Recapping the Movies Store class diagram

By the end of the chapter, we will have the complete structure for storing purchase information. Additionally, we will recap the class diagram and examine the relationship between the ...

Get Django 5 for the Impatient - Second Edition 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.