19 __authors__ = [ |
19 __authors__ = [ |
20 '"Todd Larsen" <tlarsen@google.com>', |
20 '"Todd Larsen" <tlarsen@google.com>', |
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
22 ] |
22 ] |
23 |
23 |
|
24 |
24 from google.appengine.ext import db |
25 from google.appengine.ext import db |
25 |
26 |
26 from soc.models import base |
27 import soc.models.role |
27 from soc import models |
|
28 import soc.models.person |
|
29 import soc.models.sponsor |
28 import soc.models.sponsor |
30 |
29 |
31 |
30 |
32 class Host(base.ModelWithFieldAttributes): |
31 class Host(soc.models.role.Role): |
33 """Host details for a specific Program.""" |
32 """Host details for a specific Program. |
34 |
33 """ |
35 #: A 1:1 relationship associating a Host with specific |
|
36 #: Person details and capabilities. The back-reference in |
|
37 #: the Person model is a Query named 'host'. |
|
38 person = db.ReferenceProperty(reference_class=models.person.Person, |
|
39 required=True, collection_name="host") |
|
40 |
34 |
41 #: A 1:1 relationship associating a Host with specific |
35 #: A 1:1 relationship associating a Host with specific |
42 #: Sponsor details and capabilities. The back-reference in |
36 #: Sponsor details and capabilities. The back-reference in |
43 #: the Sponsor model is a Query named 'host'. |
37 #: the Sponsor model is a Query named 'host'. |
44 sponsor = db.ReferenceProperty(reference_class=models.sponsor.Sponsor, |
38 sponsor = db.ReferenceProperty(reference_class=models.sponsor.Sponsor, |
45 required=True, collection_name="host") |
39 required=True, collection_name='hosts') |
46 |
40 |