Create lists of multiple users as a model property in Google App Engine -


I want to create a group model in Google App Engine and then there is a feature where I can make a list of UserReferences . The documentation said:

"One property can have multiple values, can be represented as the Python list in the DataStar API. The list may include values ​​of any value type supported by Datastore. . "

Will I implement it by creating:

class group (db.model): group_list = db.ListProperty (users.User)

or yes Could I easily index the user's existence key?

It depends on your usage-case. If your user already has a user model, then to store additional data about your users, then using db.ListProperty (key) for user model key is probably your best choice.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -