# HG changeset patch # User Pawel Solyga # Date 1247313415 -7200 # Node ID db306bbda381184c0ec596bb2be5c9b7f7bc2ff8 # Parent ec7818110fd293d6fcaaa8e01aaa3044f07d0825 Indention fixes and adding "reference_class=" in ReferenceProperty params. diff -r ec7818110fd2 -r db306bbda381 app/soc/models/comment.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')) diff -r ec7818110fd2 -r db306bbda381 app/soc/models/grading_record.py --- 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. diff -r ec7818110fd2 -r db306bbda381 app/soc/models/grading_survey_group.py --- 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. diff -r ec7818110fd2 -r db306bbda381 app/soc/models/mentor.py --- 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?')) diff -r ec7818110fd2 -r db306bbda381 app/soc/models/org_admin.py --- 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?')) diff -r ec7818110fd2 -r db306bbda381 app/soc/models/project_survey_record.py --- 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") diff -r ec7818110fd2 -r db306bbda381 app/soc/models/ranker_root.py --- 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') diff -r ec7818110fd2 -r db306bbda381 app/soc/models/survey.py --- 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") diff -r ec7818110fd2 -r db306bbda381 app/soc/models/survey_record.py --- 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)