app/soc/models/project_survey_record.py
changeset 2591 6c57c482f913
parent 2588 db306bbda381
child 2658 34b414a80d42
--- a/app/soc/models/project_survey_record.py	Sat Jul 11 19:37:26 2009 +0200
+++ b/app/soc/models/project_survey_record.py	Sat Jul 11 19:54:23 2009 +0200
@@ -25,6 +25,7 @@
 
 from google.appengine.ext import db
 
+from soc.models.organization import Organization
 from soc.models.survey_record import SurveyRecord
 from soc.models.project_survey import ProjectSurvey
 import soc.models.student_project
@@ -39,3 +40,10 @@
   project = db.ReferenceProperty(
       reference_class=soc.models.student_project.StudentProject,
       required=True, collection_name="survey_records")
+  
+  #: A many:1 relationship associating ProjectSurveyRecords 
+  #: with specific Organization. The back-reference in the 
+  #: Organization model is a Query named 'survey_records'.
+  org = db.ReferenceProperty(
+      reference_class=Organization, 
+      required=False, collection_name='survey_records')