app/soc/models/club.py
changeset 208 e076aee6e90f
parent 181 fdd29818a954
child 316 9efdc7bc3565
equal deleted inserted replaced
207:8ecc2e4198cd 208:e076aee6e90f
    25 
    25 
    26 from soc.models import base
    26 from soc.models import base
    27 import soc.models.group
    27 import soc.models.group
    28 
    28 
    29 
    29 
    30 class Club(base.ModelWithFieldAttributes):
    30 class Club(soc.models.group.Group):
    31   """Details specific to a Club.
    31   """Details specific to a Club.
    32 
    32 
    33   A Club is a generic type of Group that gathers Members into a community.
    33   A Club is a generic type of Group that gathers Members into a community.
    34 
    34 
    35   A Club entity participates in the following relationships implemented
    35   A Club entity participates in the following relationships implemented
    37 
    37 
    38    members)  a 1:many relationship of Members belonging to a Club.  This
    38    members)  a 1:many relationship of Members belonging to a Club.  This
    39      relation is implemented as the 'members' back-reference Query of the
    39      relation is implemented as the 'members' back-reference Query of the
    40      Member model 'club' reference.
    40      Member model 'club' reference.
    41   """
    41   """
       
    42   pass
    42 
    43 
    43   #: Required 1:1 relationship that ties Club details to the more generic
       
    44   #: Group details.  The back-reference in the Group model is a Query
       
    45   #: named 'club'.
       
    46   group = db.ReferenceProperty(reference_class=soc.models.org.Group,
       
    47                                required=True, collection_name="club")