# HG changeset patch # User Pawel Solyga # Date 1237596550 0 # Node ID 31d695f737aca7379ad3a01cac05d325a7392a26 # Parent 5f1e3b5262cb8a4f4145e77e5776aa0e460f6d2c 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 diff -r 5f1e3b5262cb -r 31d695f737ac app/soc/models/student.py --- a/app/soc/models/student.py Sat Mar 21 00:30:07 2009 +0000 +++ b/app/soc/models/student.py Sat Mar 21 00:49:10 2009 +0000 @@ -26,6 +26,8 @@ from django.utils.translation import ugettext +from soc.models import countries + import soc.models.role import soc.models.school @@ -34,6 +36,14 @@ """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 @@ "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,