blob: c85ff5d81f6185fc6db831ba5ee6e23747bc30ef [file] [log] [blame]
#summary WorksAuthors relation model
#labels Phase-Design,Contents-Skeleton,Design-Model
_*Eventually, this topic should be populated by the output of*_ `pydoc`.
{{{
class WorksAuthors(db.Model):
"""Model to store the many:many relationship between Works and Authors.
To obtain all of an Author's Works, do something like:
for link in author.works:
work = link.work
...
Similarly, for all Authors of a given Work, use:
for link in work.authors
author = link.author
...
"""
author = db.ReferenceProperty(reference_class=Author,
collection_name="works")
work = db.ReferenceProperty(reference_class=Work,
collection_name="authors")
}}}
----
_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]