Hey all,

I have a quick question about saving things. It's probably a rather
simple question but I didn't see how to do this in the documentation
anywhere but maybe I overlooked.

So lets say that I have 2 tables called SodaVendors and another table
called SodaProducts. I have a m2m relation SodaVendors being the
parent table and SodaProducts be the child table. Now lets say that I
have a row called Coca-Cola in the parent table and a row in the child
table called cherry coke.

Now my question: How do I add another entry to the child table from
the parent table? My logic tells me that I would do something along
these lines:

vendors =  sodavendors.get_object(name__exact='Coca-
Cola',select_related=True)

>From here how would I insert another row in the child table
SodaProducts?

So that I will have:
'cherry coke'  and 'coke' in the as rows in the SodaProducts table.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to