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 |
27 from django.utils.translation import ugettext |
28 |
28 |
|
29 from soc.models import countries |
|
30 |
29 import soc.models.role |
31 import soc.models.role |
30 import soc.models.school |
32 import soc.models.school |
31 |
33 |
32 |
34 |
33 class Student(soc.models.role.Role): |
35 class Student(soc.models.role.Role): |
34 """Student details for a specific Program. |
36 """Student details for a specific Program. |
35 """ |
37 """ |
|
38 |
|
39 school_name = db.StringProperty(required=True, |
|
40 verbose_name=ugettext('School Name')) |
|
41 school_name.group = ugettext("4. Private Info") |
|
42 school_country = db.StringProperty(required=True, |
|
43 verbose_name=ugettext('School Country/Territory'), |
|
44 choices=countries.COUNTRIES_AND_TERRITORIES) |
|
45 school_country.group = ugettext("4. Private Info") |
36 |
46 |
37 #: Property to gain insight into where students heard about this program |
47 #: Property to gain insight into where students heard about this program |
38 program_knowledge = db.TextProperty(required=True, verbose_name=ugettext( |
48 program_knowledge = db.TextProperty(required=True, verbose_name=ugettext( |
39 "How did you hear about this program?")) |
49 "How did you hear about this program?")) |
40 program_knowledge.help_text = ugettext("Please be as " |
50 program_knowledge.help_text = ugettext("Please be as " |
41 "specific as possible, e.g. blog post (include URL if possible), mailing " |
51 "specific as possible, e.g. blog post (include URL if possible), mailing " |
42 "list (please include list address), information session (please include " |
52 "list (please include list address), information session (please include " |
43 "location and speakers if you can), etc.") |
53 "location and speakers if you can), etc.") |
44 program_knowledge.group = ugettext("4. Private Info") |
54 program_knowledge.group = ugettext("4. Private Info") |
45 |
55 |
46 #: A many:1 relationship that ties multiple Students to the |
56 #: A many:1 relationship that ties multiple Students to the |
47 #: School that they attend. |
57 #: School that they attend. |
48 school = db.ReferenceProperty(reference_class=soc.models.school.School, |
58 school = db.ReferenceProperty(reference_class=soc.models.school.School, |
49 required=False, collection_name='students') |
59 required=False, collection_name='students') |