app/soc/models/request.py
changeset 928 df051fc9d7a1
parent 915 27c656c01591
child 959 b6e8750c9407
equal deleted inserted replaced
927:f790f77ba6b7 928:df051fc9d7a1
    16 
    16 
    17 """This module contains the Request Model."""
    17 """This module contains the Request Model."""
    18 
    18 
    19 __authors__ = [
    19 __authors__ = [
    20   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    20   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
       
    21   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    21 ]
    22 ]
    22 
    23 
    23 
    24 
    24 from google.appengine.ext import db
    25 from google.appengine.ext import db
    25 
    26 
    34   """
    35   """
    35 
    36 
    36   role = db.StringProperty(required=True)
    37   role = db.StringProperty(required=True)
    37   role.help_text = ugettext_lazy(
    38   role.help_text = ugettext_lazy(
    38       'This should be the type of the role that is requested')
    39       'This should be the type of the role that is requested')
    39   
    40 
    40   role_verbose = db.StringProperty(required=True)
    41   role_verbose = db.StringProperty(required=True)
    41   role_verbose.help_text = ugettext_lazy(
    42   role_verbose.help_text = ugettext_lazy(
    42       'This should be the verbose name of the role that is in this request')
    43       'This should be the verbose name of the role that is in this request')
    43 
    44 
    44   group_accepted = db.BooleanProperty(required=True, default=False)
    45   # property that determines the state of the request
    45   group_accepted.help_text = ugettext_lazy(
    46   # new : new Request
    46       'Field used to indicate whether a request has been accepted by the group')
    47   # group_accepted : The group has accepted this request
       
    48   # completed : This request has been handled either following a creation of
       
    49   #             the role entity
       
    50   # rejected : This request has been rejected by either the user or the group
       
    51   # ignored : The request has been ignored by the group and will not give
       
    52   #           the user access to create the role
       
    53   state = db.StringProperty(required=True, default='new',
       
    54       choices=['new', 'group_accepted', 'completed', 'rejected','ignored'])
       
    55   state.help_text = ugettext_lazy(
       
    56       'Shows the state of the request')
    47 
    57 
    48   user_accepted = db.BooleanProperty(required=True, default=False)
    58 
    49   user_accepted.help_text = ugettext_lazy(
       
    50       'Field used to indicate that a request has been accepted by the user')
       
    51   
       
    52   completed = db.BooleanProperty(required=True, default=False)
       
    53   completed.help_text = ugettext_lazy(
       
    54       'Field used to indiicate that a request has been completed and should be archived')