Build a shop with Django (part 2): orders and payment
One item in stock and two customers at the same moment: code written the ordinary way lets both through. You reproduce it on PostgreSQL, fix it, and make the payment notification safe to receive twice.