Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware #9

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Middleware #9

wants to merge 17 commits into from

Conversation

michaelavila
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants