22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 from google.appengine.ext import db |
25 from google.appengine.ext import db |
26 |
26 |
27 from django.utils.translation import ugettext_lazy |
27 from django.utils.translation import ugettext |
28 |
28 |
29 import soc.models.user |
29 import soc.models.user |
30 import soc.models.group |
30 import soc.models.group |
31 |
31 |
32 |
32 |
33 class Request(soc.models.linkable.Linkable): |
33 class Request(soc.models.linkable.Linkable): |
34 """A request is made to allow a person to create a new Role entity. |
34 """A request is made to allow a person to create a new Role entity. |
35 """ |
35 """ |
36 |
36 |
37 role = db.StringProperty(required=True) |
37 role = db.StringProperty(required=True) |
38 role.help_text = ugettext_lazy( |
38 role.help_text = ugettext( |
39 'This should be the type of the role that is requested') |
39 'This should be the type of the role that is requested') |
40 |
40 |
41 role_verbose = db.StringProperty(required=True) |
41 role_verbose = db.StringProperty(required=True) |
42 role_verbose.help_text = ugettext_lazy( |
42 role_verbose.help_text = ugettext( |
43 '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') |
44 |
44 |
45 # property that determines the state of the request |
45 # property that determines the state of the request |
46 # new : new Request |
46 # new : new Request |
47 # group_accepted : The group has accepted this request |
47 # group_accepted : The group has accepted this request |
50 # rejected : This request has been rejected by either the user or the group |
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 |
51 # ignored : The request has been ignored by the group and will not give |
52 # the user access to create the role |
52 # the user access to create the role |
53 state = db.StringProperty(required=True, default='new', |
53 state = db.StringProperty(required=True, default='new', |
54 choices=['new', 'group_accepted', 'completed', 'rejected','ignored']) |
54 choices=['new', 'group_accepted', 'completed', 'rejected','ignored']) |
55 state.help_text = ugettext_lazy('Shows the state of the request') |
55 state.help_text = ugettext('Shows the state of the request') |
56 |
56 |
57 |
57 |