How to update ReferenceProperty generated by belongs_to

0 views
Skip to first unread message

Haulyn Jason

unread,
Nov 21, 2010, 10:45:09 AM11/21/10
to Google App Engine Oil
I use belongs_to to generate the one-to-many relations, the code is
just like:

class Shop:
name

class Custom:
name

Custom.belongs_to(Shop)

I want to change a custom to another shop, then I code like:

c = Custom.get(key)
s = Shop.get(key)
c.shop = s
c.put

But, nothing happened, I read the __init__.py from gaeo/model, and
didn't find anything very special.

Should anyone help me to find the missing?

Thanks very much.

Haulyn Jason
Reply all
Reply to author
Forward
0 new messages