Fixed models based on output from graph.py script and comments on
authorPawel Solyga <Pawel.Solyga@gmail.com>
Wed, 01 Oct 2008 09:43:25 +0000
changeset 244 da80c6519eea
parent 243 b0eeea9d6da6
child 245 b14c2c4d3484
Fixed models based on output from graph.py script and comments on http://groups.google.com/group/melange-soc-dev/browse_thread/thread/fb532a7db1f19ea7
app/soc/models/administrator.py
app/soc/models/answer.py
app/soc/models/host.py
app/soc/models/organization.py
app/soc/models/review.py
app/soc/models/works_authors.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
--- 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
--- 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')
 
--- 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
 
--- 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,
--- 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):