def __init__(self, request):
    self.request = request
    self.steps = []
    try:
        self.storage = CheckoutStorage(request.session[STORAGE_SESSION_KEY])
    except KeyError:
        self.storage = CheckoutStorage()
    self.cart = Cart.for_session_cart(request.cart, discounts=request.discounts)
    self.generate_steps(self.cart)
def __init__(self, request):
    self.request = request
    self.steps = []
    try:
        self.storage = CheckoutStorage(request.session[STORAGE_SESSION_KEY])
    except KeyError:
        self.storage = CheckoutStorage()
    self.cart = Cart.for_session_cart(request.cart, discounts=request.discounts)
    self.generate_steps(self.cart)