Say I have these Models:

class Model1(db.Model):
  ....

class Model2(db.Model):
  model1 = db.ReferenceProperty(Model1, collection_name = 'model2s')
  ....

class Model3(db.Model):
  model1 = db.ReferenceProperty(Model1, collection_name = 'model3s')
  ....

Would this be the best way to get all of Model1's collection_names?

collection_names = [name for name in dir(Model1) if
isinstance(getattr(Model1,name), db.Query)]

Is there a better way?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.

Reply via email to