app/soc/models/contributor.py
changeset 181 fdd29818a954
parent 54 03e267d67478
child 207 8ecc2e4198cd
equal deleted inserted replaced
180:a1c6123f9d06 181:fdd29818a954
    22 ]
    22 ]
    23 
    23 
    24 from google.appengine.ext import db
    24 from google.appengine.ext import db
    25 
    25 
    26 from soc import models
    26 from soc import models
    27 import soc.models.author
    27 from soc.models import base
       
    28 import soc.models.person
    28 
    29 
    29 
    30 
    30 class Contributor(db.Model):
    31 class Contributor(base.ModelWithFieldAttributes):
    31   """Contributor details for a specific Program.
    32   """Contributor details for a specific Program.
    32 
    33 
    33   Some Contributor workflows have the Contributor (acting as an Author)
    34   Some Contributor workflows have the Contributor (acting as an author)
    34   creating Proposals and desiring for one (or more?) of them to be
    35   creating Proposals and desiring for one (or more?) of them to be
    35   converted into Tasks by Reviewers and Hosts.  Other workflows have the
    36   converted into Tasks by Reviewers and Hosts.  Other workflows have the
    36   Reviewers (acting as an Author) proposing Proposals, that Contributors
    37   Reviewers (acting as an author) proposing Proposals, that Contributors
    37   claim to convert them into Tasks.
    38   claim to convert them into Tasks.
    38 
    39 
    39   A Contributor entity participates in the following relationships implemented 
    40   A Contributor entity participates in the following relationships implemented 
    40   as a db.ReferenceProperty elsewhere in another db.Model:
    41   as a db.ReferenceProperty elsewhere in another db.Model:
    41 
    42 
    45   """
    46   """
    46   
    47   
    47   #: a 1:1 relationship associating a Contributor with generic Author
    48   #: a 1:1 relationship associating a Contributor with generic Author
    48   #: details and capabilities. The back-reference in the Author
    49   #: details and capabilities. The back-reference in the Author
    49   #: model is a Query named 'contributor'.
    50   #: model is a Query named 'contributor'.
    50   author = db.ReferenceProperty(reference_class=models.author.Author, 
    51   person = db.ReferenceProperty(reference_class=models.person.Person, 
    51                                 required=True, 
    52                                 required=True, 
    52                                 collection_name="contributor")
    53                                 collection_name="contributor")