Build a shop with Django (part 1): the catalog and the cart
Before the screens, decide which value lives where. Money is a Decimal, the database guards the stock, and the cart holds ids only and looks the price up every time. N+1 is watched by query count.