Check out python mix-ins there is a satchmo specific example here: http://www.satchmoproject.com/docs/dev/custom-admin.html Basically they allow you to add something to the inheritance of a class. I don't know this for sure but potentially you could make it so that CartItem inherits from your custom cart item class which only contains the m2m to fundraiser. Then it would be as if the m2m was part of cartItem because it would inherit it. I'm not totally sure if/ how this would work but check it out. More about mix-ins here: http://www.linuxjournal.com/node/4540/print
-Josh On Oct 24, 11:03 pm, paul wisehart <[email protected]> wrote: > Hi, > > I am making an online store, where a percentage of each sold item > goes to a "Fundraiser". I would like to make my own Fundraiser model, > and have it be a m2m to CartItem. > > The client needs to be able to add/remove fundraisers. The webstore > shopper needs to be able to select from a list of fundraisers when > they > add a prod. to cart. And, the cart needs to allow for that field to > be changed. > > Should i use signals ? > Like everytime the cart changes check POST for some fundraiser var? > (I know enough to get the form option into the pages from extending > templates.) > > I'm guessing I could also get this Fundraiser stored in a > CartItemDetail. > That seems less ideal, because then it couldn't be some generic > Fundraiser model > that i write, but some convention where i map the fundraiser to some > key-string. > > any ideas? > > -- > paul -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
