-
Notifications
You must be signed in to change notification settings - Fork 100
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
Improve the way product model and queryset are handled #12
Comments
More improvement mentioned on comments from Issue #10:
|
Hey, sorry for the late reply, hard disk in my macbook failed last week and it took while to get back on track. How about this:
This would the be applied in the default implementation of
Let me know what you think. Also I found a small bug in current release, I'll open a separate issue and push a fix. |
* Product is not passed on cart initialization anymore. * We are exclusivelly using the `CART_PRODUCT_MODEL` setting. * Removed the queryset attribute.
I have made some changes in the Thanks. |
Sure, I had a look at the branch, looks OK, my comments.
Not sure which approach is better, but the latter (3) has an advantage that reduces the need for subclassing to practically zero, which in turn solves the problem of having to write custom Your thoughts? |
Hey sect2k, I have merge the change into master and tagged a new release. Concerning point 3 on the alternative to having Thanks again for you help on this and I hope we can continue testing and improving the app. |
There are currently several ways to inform the cart object about the product model and the product queryset.
Product model can be passed in the cart init method
Product model dotted path can be set in settings
Product queryset can be set as an attribute on a cart subclass
Product queryset can be customized by redefining a method on a cart subclass
I'm wondering if this can be improved, simplified, be more consistent.
Issues:
__init__
. That's not the case for the product queryset which seems inconsistent. We could have both passed in__init__
or have none of them there.The text was updated successfully, but these errors were encountered: