Students now have a reference to school again.
This reference property is not required for now since the system for choosing your own school isn't implemented yet.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/models/student.py Tue Feb 17 20:07:20 2009 +0000
+++ b/app/soc/models/student.py Tue Feb 17 20:15:43 2009 +0000
@@ -24,9 +24,15 @@
from google.appengine.ext import db
import soc.models.role
+import soc.models.school
class Student(soc.models.role.Role):
"""Student details for a specific Program.
"""
- pass
+
+ #: A many:1 relationship that ties multiple Students to the
+ #: School that they attend.
+ school = db.ReferenceProperty(reference_class=soc.models.school.School,
+ required=False, collection_name='students')
+
--- a/app/soc/views/models/student.py Tue Feb 17 20:07:20 2009 +0000
+++ b/app/soc/views/models/student.py Tue Feb 17 20:15:43 2009 +0000
@@ -87,7 +87,7 @@
'Become a %(name)s'),]
new_params['extra_django_patterns'] = patterns
- new_params['extra_dynaexclude'] = ['agreed_to_tos']
+ new_params['extra_dynaexclude'] = ['agreed_to_tos', 'school']
new_params['create_extra_dynafields'] = {
'scope_path': forms.fields.CharField(widget=forms.HiddenInput,