[google-appengine] Re: pass dict() to db.Model subclass?

2009-02-26 Thread eclark
The problem was that my first keyword-argument list was in Unicode. Since StringProperty accepts Unicode, the second list was fine. I needed to convert the first list to str before proceeding. Here is the modified, working code: form_values = [str(i) for i in

[google-appengine] Re: pass dict() to db.Model subclass?

2009-02-20 Thread djidjadji
You must expand the dictionary into named-arguments No need to specify parent and key_name arguments, they have default values keys=['a','b','c'] values=['1','2','3'] data = dict(zip(keys,values)) person = Person(**data) --~--~-~--~~~---~--~~ You received this