42 """ |
42 """ |
43 |
43 |
44 #: Required field indicating the "title" of the proposal |
44 #: Required field indicating the "title" of the proposal |
45 title = db.StringProperty(required=True, |
45 title = db.StringProperty(required=True, |
46 verbose_name=ugettext('Title')) |
46 verbose_name=ugettext('Title')) |
47 title.help_text = ugettext( |
47 title.help_text = ugettext('title of the proposal') |
48 'title of the proposal') |
|
49 |
48 |
50 #: required, text field used for different purposes, |
49 #: required, text field used for different purposes, |
51 #: depending on the specific type of the proposal |
50 #: depending on the specific type of the proposal |
52 abstract = db.StringProperty(required=True, multiline=True) |
51 abstract = db.StringProperty(required=True, multiline=True) |
53 abstract.help_text = ugettext( |
52 abstract.help_text = ugettext( |
54 'short abstract, summary, or snippet;' |
53 'short abstract, summary, or snippet;' |
55 ' 500 characters or less, plain text displayed publicly') |
54 ' 500 characters or less, plain text displayed publicly') |
56 |
55 |
57 #: Required field containing the content of the proposal. |
56 #: Required field containing the content of the proposal. |
58 content = db.TextProperty(required=True) |
57 content = db.TextProperty(required=True) |
59 content.help_text = ugettext( |
58 content.help_text = ugettext('This contains your actual proposal') |
60 'This contains your actual proposal') |
|
61 |
59 |
62 #: an URL linking to more information about this students proposal |
60 #: an URL linking to more information about this students proposal |
63 additional_info = db.URLProperty(required=False) |
61 additional_info = db.URLProperty(required=False) |
64 additional_info.help_text = ugettext( |
62 additional_info.help_text = ugettext( |
65 'Link to a resource containing more information about your proposal') |
63 'Link to a resource containing more information about your proposal') |
66 |
64 |
67 #: A property containing which mentor has assigned himself to this proposal |
65 #: A property containing which mentor has assigned himself to this proposal. |
68 #: Only a proposal with an assigned mentor can be turned into a accepted proposal |
66 #: Only a proposal with an assigned mentor can be turned into |
69 #: A proposal can only have one mentor |
67 #: a accepted proposal. A proposal can only have one mentor. |
70 mentor = db.ReferenceProperty(reference_class=soc.models.mentor.Mentor, |
68 mentor = db.ReferenceProperty(reference_class=soc.models.mentor.Mentor, |
71 required=False, collection_name='student_proposals') |
69 required=False, |
|
70 collection_name='student_proposals') |
72 |
71 |
73 #: A property containing a list of possible Mentors for this proposal |
72 #: A property containing a list of possible Mentors for this proposal |
74 possible_mentors = db.ListProperty(item_type=db.Key, default=[]) |
73 possible_mentors = db.ListProperty(item_type=db.Key, default=[]) |
75 |
74 |
76 #: the current score of this proposal, used to determine which proposals |
75 #: the current score of this proposal, used to determine which proposals |
86 #: invalid: the student or developer marked this as an invalid proposal. |
85 #: invalid: the student or developer marked this as an invalid proposal. |
87 status = db.StringProperty(required=True, default='new', |
86 status = db.StringProperty(required=True, default='new', |
88 choices=['new', 'pending', 'accepted', 'rejected', 'invalid']) |
87 choices=['new', 'pending', 'accepted', 'rejected', 'invalid']) |
89 |
88 |
90 #: organization to which this proposal is directed |
89 #: organization to which this proposal is directed |
91 org = db.ReferenceProperty(reference_class=soc.models.organization.Organization, |
90 org = db.ReferenceProperty( |
92 required=True, collection_name='student_proposals') |
91 reference_class=soc.models.organization.Organization, |
|
92 required=True, collection_name='student_proposals') |
93 |
93 |
94 #: program in which this proposal has been created |
94 #: program in which this proposal has been created |
95 program = db.ReferenceProperty(reference_class=soc.models.program.Program, |
95 program = db.ReferenceProperty(reference_class=soc.models.program.Program, |
96 required=True, collection_name='student_proposals') |
96 required=True, |
|
97 collection_name='student_proposals') |
97 |
98 |
98 #: date when the proposal was created |
99 #: date when the proposal was created |
99 created_on = db.DateTimeProperty(required=True, auto_now_add=True) |
100 created_on = db.DateTimeProperty(required=True, auto_now_add=True) |
100 |
101 |
101 #: date when the proposal was last modified, should be set manually on edit |
102 #: date when the proposal was last modified, should be set manually on edit |