Indention fixes and adding "reference_class=" in ReferenceProperty params.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Sat, 11 Jul 2009 13:56:55 +0200
changeset 2588 db306bbda381
parent 2587 ec7818110fd2
child 2589 2ecd4df2c9c7
Indention fixes and adding "reference_class=" in ReferenceProperty params.
app/soc/models/comment.py
app/soc/models/grading_record.py
app/soc/models/grading_survey_group.py
app/soc/models/mentor.py
app/soc/models/org_admin.py
app/soc/models/project_survey_record.py
app/soc/models/ranker_root.py
app/soc/models/survey.py
app/soc/models/survey_record.py
--- a/app/soc/models/comment.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/comment.py	Sat Jul 11 13:56:55 2009 +0200
@@ -42,7 +42,7 @@
   #: A required many:1 relationship with a comment entity indicating
   #: the user who provided that comment.
   author = db.ReferenceProperty(reference_class=soc.models.user.User,
-                                  required=True, collection_name="commented")
+                                required=True, collection_name="commented")
 
   #: The rich textual content of this comment
   content = db.TextProperty(verbose_name=_('Content'))
--- a/app/soc/models/grading_record.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/grading_record.py	Sat Jul 11 13:56:55 2009 +0200
@@ -57,21 +57,23 @@
 
   #: The GradingSurveyGroup to which this record belongs
   grading_survey_group = db.ReferenceProperty(
-      GradingSurveyGroup, required=True, collection_name='grading_records')
+      reference_class=GradingSurveyGroup, required=True, 
+      collection_name='grading_records')
 
   #: Mentor's GradingProjectSurveyRecord for this evaluation. Iff exists.
   mentor_record = db.ReferenceProperty(
-      GradingProjectSurveyRecord, required=False,
+      reference_class=GradingProjectSurveyRecord, required=False,
       collection_name='mentor_grading_records')
 
   #: Student's ProjectSurveyRecord for this evaluation. Iff exists.
   student_record = db.ReferenceProperty(
-      ProjectSurveyRecord, required=False,
+      reference_class=ProjectSurveyRecord, required=False,
       collection_name='student_grading_records')
 
   #: Project for this evaluation.
   project = db.ReferenceProperty(
-      StudentProject, required=True, collection_name='grading_records')
+      reference_class=StudentProject, required=True, 
+      collection_name='grading_records')
 
   #: Grade decision set for this grading record.
   #: pass: Iff the mentor_record states that the student has passed. 
--- a/app/soc/models/grading_survey_group.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/grading_survey_group.py	Sat Jul 11 13:56:55 2009 +0200
@@ -56,12 +56,12 @@
 
   #: GradingProjectSurvey which belongs to this group.
   grading_survey = db.ReferenceProperty(
-      GradingProjectSurvey, required=True,
+      reference_class=GradingProjectSurvey, required=True,
       collection_name='grading_survey_groups')
 
   #: non-required ProjectSurvey that belongs to this group.
   student_survey = db.ReferenceProperty(
-      ProjectSurvey, required=False,
+      reference_class=ProjectSurvey, required=False,
       collection_name='project_survey_groups')
 
   #: DateTime when the last GradingRecord update was started for this group.
--- a/app/soc/models/mentor.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/mentor.py	Sat Jul 11 13:56:55 2009 +0200
@@ -36,7 +36,7 @@
 
   #: A required property that defines the program that this mentor works for
   program = db.ReferenceProperty(reference_class=soc.models.program.Program,
-                              required=True, collection_name='mentors')
+                                 required=True, collection_name='mentors')
 
   can_we_contact_you = db.BooleanProperty(verbose_name=ugettext(
       'Can we contact you?'))
--- a/app/soc/models/org_admin.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/org_admin.py	Sat Jul 11 13:56:55 2009 +0200
@@ -37,7 +37,7 @@
 
   #: A required property that defines the program that this org admin works for
   program = db.ReferenceProperty(reference_class=soc.models.program.Program,
-                              required=True, collection_name='org_admins')
+                                 required=True, collection_name='org_admins')
 
   can_we_contact_you = db.BooleanProperty(verbose_name=ugettext(
       'Can we contact you?'))
--- a/app/soc/models/project_survey_record.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/project_survey_record.py	Sat Jul 11 13:56:55 2009 +0200
@@ -36,6 +36,6 @@
   """
 
   #: Reference to the Project that this record belongs to.
-  project = db.ReferenceProperty(soc.models.student_project.StudentProject,
-                                 required=True,
-                                 collection_name="survey_records")
+  project = db.ReferenceProperty(
+      reference_class=soc.models.student_project.StudentProject,
+      required=True, collection_name="survey_records")
--- a/app/soc/models/ranker_root.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/ranker_root.py	Sat Jul 11 13:56:55 2009 +0200
@@ -33,5 +33,4 @@
   """
 
   #: A required reference property to the root of the RankList tree
-  root = db.ReferenceProperty(required=True,
-      collection_name='roots')
+  root = db.ReferenceProperty(required=True, collection_name='roots')
--- a/app/soc/models/survey.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/survey.py	Sat Jul 11 13:56:55 2009 +0200
@@ -156,5 +156,5 @@
       ' cannot be taken.')
 
   #: Referenceproperty that specifies the content of this survey.
-  survey_content = db.ReferenceProperty(SurveyContent,
-                                     collection_name="survey_parent")
+  survey_content = db.ReferenceProperty(reference_class=SurveyContent,
+                                        collection_name="survey_parent")
--- a/app/soc/models/survey_record.py	Tue Jul 07 20:17:23 2009 -0500
+++ b/app/soc/models/survey_record.py	Sat Jul 11 13:56:55 2009 +0200
@@ -40,7 +40,8 @@
   """
 
   #: The survey for which this entity is a record.
-  survey = db.ReferenceProperty(Survey, collection_name="survey_records")
+  survey = db.ReferenceProperty(
+      reference_class=Survey, collection_name="survey_records")
 
   #: Date when this record was created.
   created = db.DateTimeProperty(auto_now_add=True)