34 """The Program model, representing a Program ran by a Sponsor. |
34 """The Program model, representing a Program ran by a Sponsor. |
35 """ |
35 """ |
36 |
36 |
37 #: Required field storing name of the group. |
37 #: Required field storing name of the group. |
38 name = db.StringProperty(required=True, |
38 name = db.StringProperty(required=True, |
39 verbose_name=ugettext_lazy('Name')) |
39 verbose_name=ugettext('Name')) |
40 name.help_text = ugettext_lazy('Complete, formal name of the program.') |
40 name.help_text = ugettext('Complete, formal name of the program.') |
41 name.example_text = ugettext_lazy( |
41 name.example_text = ugettext( |
42 '<small><i>e.g.</i></small> <tt>Google Summer of Code 2009</tt>') |
42 '<small><i>e.g.</i></small> <tt>Google Summer of Code 2009</tt>') |
43 |
43 |
44 #: Required field storing short name of the group. |
44 #: Required field storing short name of the group. |
45 #: It can be used for displaying group as sidebar menu item. |
45 #: It can be used for displaying group as sidebar menu item. |
46 short_name = db.StringProperty(required=True, |
46 short_name = db.StringProperty(required=True, |
47 verbose_name=ugettext_lazy('Short name')) |
47 verbose_name=ugettext('Short name')) |
48 short_name.help_text = ugettext_lazy('Short name used for sidebar menu') |
48 short_name.help_text = ugettext('Short name used for sidebar menu') |
49 short_name.example_text = ugettext_lazy( |
49 short_name.example_text = ugettext( |
50 '<small><i>e.g.</i></small> <tt>GSoC 2009</tt>') |
50 '<small><i>e.g.</i></small> <tt>GSoC 2009</tt>') |
51 |
51 |
52 #: Optional field used to relate it to other programs |
52 #: Optional field used to relate it to other programs |
53 #: For example, GSoC would be a group label for GSoC2008/GSoC2009 |
53 #: For example, GSoC would be a group label for GSoC2008/GSoC2009 |
54 group_label = db.StringProperty( |
54 group_label = db.StringProperty( |
55 verbose_name=ugettext_lazy('Group label')) |
55 verbose_name=ugettext('Group label')) |
56 group_label.help_text = ugettext_lazy( |
56 group_label.help_text = ugettext( |
57 'Optional name used to relate this program to others.') |
57 'Optional name used to relate this program to others.') |
58 group_label.example_text = ugettext_lazy( |
58 group_label.example_text = ugettext( |
59 '<small><i>e.g.</i></small> <tt>GSoC</tt>') |
59 '<small><i>e.g.</i></small> <tt>GSoC</tt>') |
60 |
60 |
61 #: Required field storing description of the group. |
61 #: Required field storing description of the group. |
62 description = db.TextProperty(required=True, |
62 description = db.TextProperty(required=True, |
63 verbose_name=ugettext_lazy('Description')) |
63 verbose_name=ugettext('Description')) |
64 description.example_text = ugettext_lazy( |
64 description.example_text = ugettext( |
65 '<small><i>for example:</i></small><br>' |
65 '<small><i>for example:</i></small><br>' |
66 '<tt><b>GSoC 2009</b> is the <i>Google Summer of Code</i>,' |
66 '<tt><b>GSoC 2009</b> is the <i>Google Summer of Code</i>,' |
67 ' but in <u>2009</u>!</tt><br><br>' |
67 ' but in <u>2009</u>!</tt><br><br>' |
68 '<small><i>(rich text formatting is supported)</i></small>') |
68 '<small><i>(rich text formatting is supported)</i></small>') |
69 |
69 |
70 #: Required field storing application/tasks limit of the program. |
70 #: Required field storing application/tasks limit of the program. |
71 apps_tasks_limit = db.IntegerProperty(required=True, |
71 apps_tasks_limit = db.IntegerProperty(required=True, |
72 verbose_name=ugettext_lazy('Application/Tasks Limit')) |
72 verbose_name=ugettext('Application/Tasks Limit')) |
73 apps_tasks_limit.example_text = ugettext_lazy( |
73 apps_tasks_limit.example_text = ugettext( |
74 '<small><i>e.g.</i></small> ' |
74 '<small><i>e.g.</i></small> ' |
75 '<tt><b>20</b> is the student applications limit for <i>Google Summer ' |
75 '<tt><b>20</b> is the student applications limit for <i>Google Summer ' |
76 'of Code</i>, but <b>1</b> is the tasks limit that the student can work ' |
76 'of Code</i>, but <b>1</b> is the tasks limit that the student can work ' |
77 'on at the same time during <i>GHOP</i></tt>') |
77 'on at the same time during <i>GHOP</i></tt>') |
78 |
78 |
79 #: Required field storing slots limit of the program. |
79 #: Required field storing slots limit of the program. |
80 slots = db.IntegerProperty(required=True, |
80 slots = db.IntegerProperty(required=True, |
81 verbose_name=ugettext_lazy('Slots')) |
81 verbose_name=ugettext('Slots')) |
82 slots.example_text = ugettext_lazy( |
82 slots.example_text = ugettext( |
83 '<small><i>e.g.</i></small> ' |
83 '<small><i>e.g.</i></small> ' |
84 '<tt><b>500</b> might be an amount of slots for <i>Google Summer ' |
84 '<tt><b>500</b> might be an amount of slots for <i>Google Summer ' |
85 'of Code</i>, which indicates how many students can be accepted ' |
85 'of Code</i>, which indicates how many students can be accepted ' |
86 'to the program.<br>For <i>GHOP</i> this indicates how ' |
86 'to the program.<br>For <i>GHOP</i> this indicates how ' |
87 'many tasks can be completed.</tt>') |
87 'many tasks can be completed.</tt>') |
88 |
88 |
89 #: Required field storing the type of workflow this program has |
89 #: Required field storing the type of workflow this program has |
90 workflow = db.StringProperty(required=True, |
90 workflow = db.StringProperty(required=True, |
91 choices=['gsoc', 'ghop'], |
91 choices=['gsoc', 'ghop'], |
92 verbose_name= ugettext_lazy('Workflow type')) |
92 verbose_name= ugettext('Workflow type')) |
93 workflow.example_text = ugettext_lazy( |
93 workflow.example_text = ugettext( |
94 '<tt><b>Project-based</b> for GSoC workflow type,<br>' |
94 '<tt><b>Project-based</b> for GSoC workflow type,<br>' |
95 '<b>Task-based</b> for GHOP workflow type.</tt>') |
95 '<b>Task-based</b> for GHOP workflow type.</tt>') |
96 |
96 |
97 #: Required 1:1 relationship indicating the Program the Timeline |
97 #: Required 1:1 relationship indicating the Program the Timeline |
98 #: belongs to. |
98 #: belongs to. |
99 timeline = db.ReferenceProperty(reference_class=soc.models.timeline.Timeline, |
99 timeline = db.ReferenceProperty(reference_class=soc.models.timeline.Timeline, |
100 required=True, collection_name="program", |
100 required=True, collection_name="program", |
101 verbose_name=ugettext_lazy('Timeline')) |
101 verbose_name=ugettext('Timeline')) |