Shouldn't `self.cart.clear()` be enough? Especially deleting `request.cart` does not look like a good idea. Code that expects the attribute to always be there will fail instead of getting an empty cart.