On Thu, Jul 22, 2010 at 12:09 PM, Brian Lee <[email protected]> wrote:
>
> Another question, how would I set the Category for the product?
>
> It doesnt seem to like p.category = 'Bedroom' or p.category = 2
>

It expects a category object. So you ought to be able to do something
like this...

from product.models import Product, Category
p.category = Category.objects.get(id=2)
# or this...
p.category = Category.objects.get(name='Bedroom')

I didn't test those statements in my python console, but I think I'm
at least close!


--Stuart

-- 
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.

Reply via email to