app/soc/modules/ghop/models/org_prize_assignment.py
changeset 2407 e23fce20ad3a
parent 2399 65a83ae32703
equal deleted inserted replaced
2406:6f966e1a80bc 2407:e23fce20ad3a
    24 
    24 
    25 from google.appengine.ext import db
    25 from google.appengine.ext import db
    26 
    26 
    27 import soc.models.base
    27 import soc.models.base
    28 
    28 
    29 from soc.modules.ghop.models import organization as ghop_organization_model
    29 import soc.modules.ghop.models.organization
    30 from soc.modules.ghop.models import program as ghop_program_model
    30 import soc.modules.ghop.models.program
    31 
    31 
    32 
    32 
    33 class GHOPOrgPrizeAssignment(soc.models.base.ModelWithFieldAttributes):
    33 class GHOPOrgPrizeAssignment(soc.models.base.ModelWithFieldAttributes):
    34   """Model for prizes assigned to Students by an Organization.
    34   """Model for prizes assigned to Students by an Organization.
    35   """
    35   """
    36 
    36 
    37   #: Program to which these winners belong to
    37   #: Program to which these winners belong to
    38   program = db.ReferenceProperty(
    38   program = db.ReferenceProperty(
    39       reference_class=ghop_program_model.GHOPProgram,
    39       reference_class=soc.modules.ghop.models.program.GHOPProgram,
    40       required=True, collection_name='program_prizes')
    40       required=True, collection_name='program_prizes')
    41 
    41 
    42   #: Organization to which these winners belong to
    42   #: Organization to which these winners belong to
    43   org = db.ReferenceProperty(
    43   org = db.ReferenceProperty(
    44       reference_class=ghop_organization_model.GHOPOrganization,
    44       reference_class=soc.modules.ghop.models.organization.GHOPOrganization,
    45       required=True, collection_name='organization_prizes')
    45       required=True, collection_name='organization_prizes')
    46 
    46 
    47   #: Ordered list of winners(reference to Student entities) for the given
    47   #: Ordered list of winners(reference to Student entities) for the given
    48   #: organization under the specified program
    48   #: organization under the specified program
    49   winners = db.ListProperty(item_type=db.Key, default=[])
    49   winners = db.ListProperty(item_type=db.Key, default=[])