From 4ce0d048f82c211cd4e52cfde074debfcce4bf32 Mon Sep 17 00:00:00 2001 From: Pawel Solyga Date: Sat, 21 Mar 2009 00:49:10 +0000 Subject: [PATCH] Add school name and school country properties to Student Role. For now we will use this solution, and hopefully soon we will introduce new School model. Patch by: Pawel Solyga Reviewed by: to-be-reviewed --- app/soc/models/student.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/soc/models/student.py b/app/soc/models/student.py index 7b977597..2e391679 100644 --- a/app/soc/models/student.py +++ b/app/soc/models/student.py @@ -26,6 +26,8 @@ from google.appengine.ext import db from django.utils.translation import ugettext +from soc.models import countries + import soc.models.role import soc.models.school @@ -34,6 +36,14 @@ class Student(soc.models.role.Role): """Student details for a specific Program. """ + school_name = db.StringProperty(required=True, + verbose_name=ugettext('School Name')) + school_name.group = ugettext("4. Private Info") + school_country = db.StringProperty(required=True, + verbose_name=ugettext('School Country/Territory'), + choices=countries.COUNTRIES_AND_TERRITORIES) + school_country.group = ugettext("4. Private Info") + #: Property to gain insight into where students heard about this program program_knowledge = db.TextProperty(required=True, verbose_name=ugettext( "How did you hear about this program?")) @@ -42,7 +52,7 @@ class Student(soc.models.role.Role): "list (please include list address), information session (please include " "location and speakers if you can), etc.") program_knowledge.group = ugettext("4. Private Info") - + #: A many:1 relationship that ties multiple Students to the #: School that they attend. school = db.ReferenceProperty(reference_class=soc.models.school.School, -- 2.11.4.GIT