divio/django-shop — pull request #185 by alesdotio (2012-10-08 13:39:14+00:00)
Title: Automatically delete unconfirmed orders

When posting to CheckoutSelectionView, it now deletes all old unconfirmed orders before creating a new one. These are orders that have the status PROCESSING, which are totally useless and we do not need to store them.

I added a cart_pk field to the Order object because I would like to use it later for emptying the cart in the ShopAPI (this will be a separate pull request).

Will add tests after some feedback ;)