equal
deleted
inserted
replaced
30 |
30 |
31 class Host(soc.models.role.Role): |
31 class Host(soc.models.role.Role): |
32 """Host details for a specific Program. |
32 """Host details for a specific Program. |
33 """ |
33 """ |
34 |
34 |
|
35 KEY_FIELDS = ['sponsor_ln', 'user_ln'] |
|
36 |
35 #: A 1:1 relationship associating a Host with specific |
37 #: A 1:1 relationship associating a Host with specific |
36 #: Sponsor details and capabilities. The back-reference in |
38 #: Sponsor details and capabilities. The back-reference in |
37 #: the Sponsor model is a Query named 'host'. |
39 #: the Sponsor model is a Query named 'host'. |
38 sponsor = db.ReferenceProperty(reference_class=soc.models.sponsor.Sponsor, |
40 sponsor = db.ReferenceProperty(reference_class=soc.models.sponsor.Sponsor, |
39 required=True, collection_name='hosts') |
41 required=True, collection_name='hosts') |
40 |
42 |
|
43 def _get_link_name(self): |
|
44 return self.sponsor.link_name |
|
45 |
|
46 def _set_link_name(self, value): |
|
47 self.sponsor.link_name = value |
|
48 |
|
49 sponsor_ln = property(_get_link_name, _set_link_name) |
|
50 |