Re: Inheriting attributes from a model

2009-04-02 Thread Denis
Thanks! Problem solved, here's how to do it: class QuoteItemManager(models.Manager): def from_product(self, product): i = QuoteItem(current_product=product) i.product_serialized = serializers.serialize('json', Product.objects.filter(id=product.id)) try: i.p

Re: Inheriting attributes from a model

2009-04-01 Thread Rajesh D
On Apr 1, 3:42 pm, Denis wrote: > Now I've got serialization to json working thanks to your advice. > I still have problems with converting the data back into an object, > but I don't have time to look into that now. It'll have to wait > tomorrow. http://docs.djangoproject.com/en/dev/topics/se

Re: Inheriting attributes from a model

2009-04-01 Thread Denis
Now I've got serialization to json working thanks to your advice. I still have problems with converting the data back into an object, but I don't have time to look into that now. It'll have to wait tomorrow. Thanks ! --~--~-~--~~~---~--~~ You received this message

Re: Inheriting attributes from a model

2009-04-01 Thread Rajesh D
On Apr 1, 6:43 am, Denis wrote: > I am developing a store using Satchmo, and I want the ability to save > quotes; that's snapshots of the current cart, and I want to store the > history of all the quotes in the database. My current models look like > this: > > class QuoteItem(models.Model, Prod

Inheriting attributes from a model

2009-04-01 Thread Denis
I am developing a store using Satchmo, and I want the ability to save quotes; that's snapshots of the current cart, and I want to store the history of all the quotes in the database. My current models look like this: class QuoteItem(models.Model, Product): quantity = models.PositiveIntegerFie