bmentges/django-cart — pull request #9 by t3hh00d (2013-04-16 00:24:54+00:00)
Title: Middleware

**Note** Don't merge this yet, I created this pull request to track the idea, and am certain there is stuff to do.

This is a proposal for a middleware centric approach to the cart. The major differences are the removal of cart/cart.py (the relevant behavior is moved to models.Cart so there is only one kind of Cart object.) Determining which cart to use has been moved to a middleware which attaches the cart to the request. I believe that this should satisfy the requirement that most context_processors would satisfy, that you can retrieve the cart in the context as well (through ResponseContext.) Although I'm not certain about that last point and still need to look into it.