app/soc/models/request.py
changeset 562 1bf2beedda03
parent 533 ba3309b2fd30
child 915 27c656c01591
equal deleted inserted replaced
561:4db464032b25 562:1bf2beedda03
    31 
    31 
    32 class Request(soc.models.linkable.Linkable):
    32 class Request(soc.models.linkable.Linkable):
    33   """A request is made to allow a person to create a new Role entity.
    33   """A request is made to allow a person to create a new Role entity.
    34   """
    34   """
    35 
    35 
    36   requester = db.ReferenceProperty(reference_class=soc.models.user.User,
       
    37                               required=True, collection_name="requests")
       
    38   requester.help_text = ugettext_lazy(
       
    39       'This is the user who the request is made for')
       
    40 
       
    41   role = db.StringProperty()
    36   role = db.StringProperty()
    42   role.help_text = ugettext_lazy(
    37   role.help_text = ugettext_lazy(
    43       'This should be the type of the role that is requested')
    38       'This should be the type of the role that is requested')
    44 
    39 
    45   to = db.ReferenceProperty(reference_class=soc.models.group.Group,
    40   group_accepted = db.BooleanProperty()
    46                             required=True, collection_name="requests")
    41   group_accepted.help_text = ugettext_lazy(
    47   to.help_text = ugettext_lazy(
    42       'Field used to indicate whether a request has been accepted by the group')
    48       'The group that the request should be made to '
       
    49       '(this group should have the authority to grant the request)')
       
    50 
    43 
    51   accepted = db.BooleanProperty()
    44   user_accepted = db.BooleanProperty()
    52   accepted.help_text = ugettext_lazy(
    45   user_accepted.help_text = ugettext_lazy(
    53       'Field used to indicate whether a request has been accepted')
    46       'Field used to indicate that a request has been accepted by the user')
    54 
       
    55   declined = db.BooleanProperty()
       
    56   declined.help_text = ugettext_lazy(
       
    57       'Field used to indicate that a request has been rejected by the user')