You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have two carts on a single web site, which is easy enough - but I would like each one to work on a different model. I think the best way would be to add an optional model kwarg to the Cart__init__ method, then have get_product_model use the specified model if it exists, otherwise it falls back to the current behaviour.
Is this something done before? if it's useful, could I do a pull request for it?
The text was updated successfully, but these errors were encountered:
I went another way with this. I made Django Carton model agnostic, so it doesn't need to know in advance what product model it's dealing with. My real world use is that my cart needs to be able to deal with both Merchandise and Ticket models.
I would like to have two carts on a single web site, which is easy enough - but I would like each one to work on a different model. I think the best way would be to add an optional
model
kwarg to theCart
__init__
method, then haveget_product_model
use the specified model if it exists, otherwise it falls back to the current behaviour.Is this something done before? if it's useful, could I do a pull request for it?
The text was updated successfully, but these errors were encountered: