Oh boy! That certainly puts the brakes on some of my ideas. Wow. That solves my immediate problem though. Thanks for the answer.
On Mar 21, 5:44 am, Tim Hoffman <zutes...@gmail.com> wrote: > HI > > ListProperty tan take basic properties as contained types, i.e. str, > db.Key, Int, but not model objects (se ethe docs for the full list) > Seehttp://code.google.com/appengine/docs/python/datastore/typesandproper... > and have a look at the value type > of ListProperty > > You are trying to put a model in the ListProperty, rather than than > something that is an acceptable property or basic python tupe > > That list should be a list of keys I would think, (ie keys of > PhoneInfo entities) > > Rgds > > T > > On Mar 21, 3:53 pm, Laran Evans <laran.ev...@gmail.com> wrote: > > > I'm using the app-enging django helper > > > Here are my models as defined in models.py. > > > class PhoneInfo(BaseModel): > > name = db.StringProperty() > > phone = db.PhoneNumberProperty() > > > class Person(BaseModel): > > is_verified = db.BooleanProperty() > > verification_token = db.StringProperty() > > verified_at = db.DateTimeProperty() > > first_name = db.StringProperty() > > last_name = db.StringProperty() > > email = db.EmailProperty() > > hashed_password = db.StringProperty() > > password_reset_token = db.StringProperty() > > phone_numbers = db.ListProperty(PhoneInfo) > > > When I load up the shel and simply try to import, I get a ValueError. > > > >>> from laranevans.tracker.models import Person > > > Traceback (most recent call last): > > File "<console>", line 1, in <module> > > File "/Users/laran/Workspace/laranevans/../laranevans/tracker/ > > models.py", line 12, in <module> > > class Person(BaseModel): > > File "/Users/laran/Workspace/laranevans/../laranevans/tracker/ > > models.py", line 21, in Person > > phone_numbers = db.ListProperty(PhoneInfo) > > File "/usr/local/google_appengine/google/appengine/ext/db/ > > __init__.py", line 2362, in __init__ > > raise ValueError('Item type %s is not acceptable' % > > item_type.__name__) > > ValueError: Item type PhoneInfo is not acceptable > > > I'm sure it's something simple. I can't see it for the life of me > > though. Any help would be very welcome. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---