equal
deleted
inserted
replaced
25 |
25 |
26 from soc.models import base |
26 from soc.models import base |
27 import soc.models.group |
27 import soc.models.group |
28 |
28 |
29 |
29 |
30 class School(base.ModelWithFieldAttributes): |
30 class School(soc.models.group.Group): |
31 """Details specific to a School. |
31 """Details specific to a School. |
32 |
32 |
33 A School is a specific type of Group that gathers Students together. |
33 A School is a specific type of Group that gathers Students together. |
34 |
34 |
35 A School entity participates in the following relationships implemented |
35 A School entity participates in the following relationships implemented |
37 |
37 |
38 students) a 1:many relationship of Students attending (or otherwise |
38 students) a 1:many relationship of Students attending (or otherwise |
39 belonging to) a School. This relation is implemented as the 'students' |
39 belonging to) a School. This relation is implemented as the 'students' |
40 back-reference Query of the Student model 'school' reference. |
40 back-reference Query of the Student model 'school' reference. |
41 """ |
41 """ |
|
42 pass |
42 |
43 |
43 #: Required 1:1 relationship that ties School details to the more |
|
44 #: generic Group details. The back-reference in the Group model is a |
|
45 #: Query named 'school'. |
|
46 group = db.ReferenceProperty(reference_class=soc.models.group.Group, |
|
47 required=True, collection_name="school") |
|