# HG changeset patch # User Pawel Solyga # Date 1222783211 0 # Node ID 8e208e326adb5a86c8aa66581bd1046e8955b52e # Parent ec26682053df082794a649a06f2a7135bb07a1bd Add org ReferenceProperty to Administrator model (many:1 relationship associating Administrators with specific Organization). Update Organization model __doc__ string with information about the back-reference 'admins'. Patch by: Pawel Solyga Review by: to-be-reviewed diff -r ec26682053df -r 8e208e326adb app/soc/models/administrator.py --- a/app/soc/models/administrator.py Tue Sep 30 12:59:59 2008 +0000 +++ b/app/soc/models/administrator.py Tue Sep 30 14:00:11 2008 +0000 @@ -24,11 +24,17 @@ from google.appengine.ext import db +from soc.models import organization + import soc.models.reviewer class Administrator(soc.models.reviewer.Reviewer): """Administrator details for a specific Program. """ - pass + #: 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") diff -r ec26682053df -r 8e208e326adb app/soc/models/organization.py --- a/app/soc/models/organization.py Tue Sep 30 12:59:59 2008 +0000 +++ b/app/soc/models/organization.py Tue Sep 30 14:00:11 2008 +0000 @@ -35,6 +35,9 @@ 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