app/soc/models/organization.py
changeset 208 e076aee6e90f
parent 181 fdd29818a954
child 212 8e208e326adb
equal deleted inserted replaced
207:8ecc2e4198cd 208:e076aee6e90f
    20   '"Pawel Solyga" <pawel.solyga@gmail.com>',
    20   '"Pawel Solyga" <pawel.solyga@gmail.com>',
    21 ]
    21 ]
    22 
    22 
    23 from google.appengine.ext import db
    23 from google.appengine.ext import db
    24 
    24 
    25 from soc.models import base
       
    26 from soc import models
    25 from soc import models
    27 import soc.models.group
    26 import soc.models.group
    28 import soc.models.administrator
       
    29 
    27 
    30 class Organization(base.ModelWithFieldAttributes):
    28 class Organization(soc.models.group.Group):
    31   """Organization details.
    29   """Organization details.
    32 
    30 
    33   A Organization entity participates in the following relationships implemented 
    31   A Organization entity participates in the following relationships implemented 
    34   as a db.ReferenceProperty elsewhere in another db.Model:
    32   as a db.ReferenceProperty elsewhere in another db.Model:
    35 
    33 
    36    admins)  a many:1 relationship associating Administrators with
    34    reviewers)  a many:1 relationship associating Reviewers with
    37      a specific Organization. This relation is implemented as the
    35      a specific Organization. This relation is implemented as the
    38      'admins' back-reference Query of the Organization model 'org' reference.
    36      'reviewers' back-reference Query of the Organization model 'org'
       
    37      reference.
       
    38   """
       
    39   pass
    39 
    40 
    40   """
       
    41 
       
    42   #: A 1:1 relationship associating a Organization with more generic
       
    43   #: Group details and capabilities.  The back-reference in
       
    44   #: the Group model is a Query named 'org'.
       
    45   group = db.ReferenceProperty(reference_class=models.group.Group, 
       
    46                                required=True, collection_name="org")
       
    47