# HG changeset patch # User Pawel Solyga # Date 1222854205 0 # Node ID da80c6519eea2b0a1c3554894cc8079f9e8feac3 # Parent b0eeea9d6da60e86036acb29734fcf344155d506 Fixed models based on output from graph.py script and comments on http://groups.google.com/group/melange-soc-dev/browse_thread/thread/fb532a7db1f19ea7 diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/administrator.py --- a/app/soc/models/administrator.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/administrator.py Wed Oct 01 09:43:25 2008 +0000 @@ -32,9 +32,4 @@ class Administrator(soc.models.reviewer.Reviewer): """Administrator details for a specific Program. """ - #: A many:1 relationship associating Administrators with specific - #: Organization details and capabilities. The back-reference in the - #: Organization model is a Query named 'admins'. - org = db.ReferenceProperty(reference_class=organization.Organization, - required=True, collection_name="admins") - + pass diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/answer.py --- a/app/soc/models/answer.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/answer.py Wed Oct 01 09:43:25 2008 +0000 @@ -38,9 +38,10 @@ #: It is currently unclear how useful this back-reference will be, #: since the same question could be used in multiple different #: Review "templates". Given this, 'answers' currently only exists - #: for completeness. - question = db.ReferenceProperty(reference_class=models.question.Question, - required=True, collection_name="answers") + #: for completeness. + # TODO: Uncomment when Question model is committed + #question = db.ReferenceProperty(reference_class=models.question.Question, + # required=True, collection_name="answers") #: A required many:1 relationship, where each of many Answers to #: different Questions represents the answer set of a specific diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/host.py --- a/app/soc/models/host.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/host.py Wed Oct 01 09:43:25 2008 +0000 @@ -35,6 +35,6 @@ #: A 1:1 relationship associating a Host with specific #: Sponsor details and capabilities. The back-reference in #: the Sponsor model is a Query named 'host'. - sponsor = db.ReferenceProperty(reference_class=models.sponsor.Sponsor, + sponsor = db.ReferenceProperty(reference_class=soc.models.sponsor.Sponsor, required=True, collection_name='hosts') diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/organization.py --- a/app/soc/models/organization.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/organization.py Wed Oct 01 09:43:25 2008 +0000 @@ -35,9 +35,6 @@ a specific Organization. This relation is implemented as the 'reviewers' back-reference Query of the Organization model 'org' reference. - admins) a many:1 relationship associating Administrators with a specific - Organization. This relation is implemented as the 'admins' back-reference - Query of the Organization model 'org' reference. """ pass diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/review.py --- a/app/soc/models/review.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/review.py Wed Oct 01 09:43:25 2008 +0000 @@ -69,8 +69,9 @@ #: back-reference in the Survey model is a Query named 'reviews' #: which represents all of the Reviews that contains Answers to the #: Questions in that particular Survey. - survey = db.ReferenceProperty(reference_class=soc.models.survey.Survey, - required=True, collection_name="reviews") + # TODO: Uncomment when Survey model is committed + #survey = db.ReferenceProperty(reference_class=soc.models.survey.Survey, + # required=True, collection_name="reviews") #: A required many:1 relationship with a Work, where the Review #: answers are attached to the Work as a comment, evaluation, diff -r b0eeea9d6da6 -r da80c6519eea app/soc/models/works_authors.py --- a/app/soc/models/works_authors.py Wed Oct 01 07:26:45 2008 +0000 +++ b/app/soc/models/works_authors.py Wed Oct 01 09:43:25 2008 +0000 @@ -23,8 +23,8 @@ from google.appengine.ext import db -import soc.models.role.Role -import soc.models.work.Work +import soc.models.role +import soc.models.work class WorksAuthors(db.Model):