Changed University Student expected graduation date to be a dynamic dropdown.
[Melange.git] / app / soc / models / student.py
blob42141593496b44bb14ed6d29a11b58728134ebf2
1 #!/usr/bin/python2.5
3 # Copyright 2008 the Melange authors.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 """This module contains the Student Model."""
19 __authors__ = [
20 '"Todd Larsen" <tlarsen@google.com>',
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>',
22 '"Lennard de Rijk" <ljvderijk@gmail.com>',
26 from google.appengine.ext import db
28 from django.utils.translation import ugettext
30 from soc.models import countries
32 import soc.models.role
33 import soc.models.school
36 class Student(soc.models.role.Role):
37 """Student details for a specific Program.
38 """
40 school_name = db.StringProperty(required=True,
41 verbose_name=ugettext('School Name'))
42 school_name.group = ugettext("5. Education")
43 school_name.help_text = ugettext(
44 'Please enter the full name of your school, college or university in'
45 ' this field. Please use the complete formal name of your school, e.g.'
46 ' UC Berekeley instead of Cal or UCB. It would be most wonderful if you'
47 ' could provide your school\'s name in English, as all the program '
48 'administrators speak English as their first language and it will make'
49 ' it much easier for us to assemble program statistics, etc., later if'
50 ' we can easily read the name of your school.')
52 school_country = db.StringProperty(required=True,
53 verbose_name=ugettext('School Country/Territory'),
54 choices=countries.COUNTRIES_AND_TERRITORIES)
55 school_country.group = ugettext("5. Education")
57 major = db.StringProperty(required=True,
58 verbose_name=ugettext('Major Subject'))
59 major.group = ugettext("5. Education")
60 # TODO add more degrees because this should be used in GHOP as well
61 degree = db.StringProperty(required=True,
62 verbose_name=ugettext('Degree'),
63 choices=['Undergraduate', 'Master', 'PhD'])
64 degree.group = ugettext("5. Education")
65 expected_graduation = db.IntegerProperty(required=True,
66 verbose_name=ugettext('Expected Graduation Year'))
67 expected_graduation.help_text = ugettext("Pick your expected graduation year")
68 expected_graduation.group = ugettext("5. Education")
70 #: Property to gain insight into where students heard about this program
71 program_knowledge = db.TextProperty(required=True, verbose_name=ugettext(
72 "How did you hear about this program?"))
73 program_knowledge.help_text = ugettext("Please be as "
74 "specific as possible, e.g. blog post (include URL if possible), mailing "
75 "list (please include list address), information session (please include "
76 "location and speakers if you can), etc.")
77 program_knowledge.group = ugettext("4. Private Info")
79 #: A many:1 relationship that ties multiple Students to the
80 #: School that they attend.
81 school = db.ReferenceProperty(reference_class=soc.models.school.School,
82 required=False, collection_name='students')
84 can_we_contact_you = db.BooleanProperty(verbose_name=ugettext(
85 'Can we contact you?'))
86 can_we_contact_you.help_text = ugettext(
87 'Please check here if you would not mind being contacted by the Program'
88 ' Administrators for follow up with members of the press who would like'
89 ' to interview you about the program. You will not be contacted unless '
90 ' you successfully complete your project. <br />'
91 '<b>Please note that checking this box has no effect on your chances'
92 ' of being accepted into the program</b>.')
93 can_we_contact_you.group = ugettext("2. Contact Info (Private)")