| #summary TasksContributors relation model | |
| #labels Phase-Design,Contents-Skeleton,Design-Model,Importance-Deprecated | |
| ---- | |
| * This page is of only historical interest. | |
| * See WikiGuide. | |
| ---- | |
| _*Eventually, this topic should be populated by the output of*_ `pydoc`. | |
| {{{ | |
| class TasksContributors(db.Model): | |
| """Model to store the many:many relationship between Tasks and Contributors. | |
| To obtain all of a Contributors's Tasks, do something like: | |
| for link in contributor.tasks: | |
| task = link.task | |
| ... | |
| Similarly, for all Contributors to a given Task, use: | |
| for link in task.contributors: | |
| task = link.task | |
| ... | |
| """ | |
| task = db.ReferenceProperty(reference_class=Task, | |
| collection_name="contributors") | |
| contributor = db.ReferenceProperty(reference_class=Contributor, | |
| collection_name="tasks") | |
| }}} | |
| ---- | |
| _Copyright 2008 Google Inc._ | |
| _This work is licensed under a_ | |
| [http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-attribution-2_5.html Creative Commons Attribution 2.5 License]. | |
| [http://creativecommons.org/licenses/by/2.5/ http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-2_5-88x31.png] |