23 |
23 |
24 from google.appengine.ext import db |
24 from google.appengine.ext import db |
25 |
25 |
26 from soc import models |
26 from soc import models |
27 import soc.models.person |
27 import soc.models.person |
28 |
28 import soc.models.work |
29 |
29 |
30 class Documentation(db.Model): |
30 class Documentation(db.Model): |
31 """Model of Documentation, which is a Work authored by Administrators.""" |
31 """Model of Documentation, which is a Work authored by Administrators.""" |
32 |
32 |
33 #: A required 1:1 relationship with a Work entity that contains the |
33 #: A required 1:1 relationship with a Work entity that contains the |
46 #: just an indication that the required documentation was |
46 #: just an indication that the required documentation was |
47 #: supplied but is not actually attached. |
47 #: supplied but is not actually attached. |
48 #: |
48 #: |
49 #: work.reviews: Annotations to the Documentation made by other |
49 #: work.reviews: Annotations to the Documentation made by other |
50 #: Administrators. |
50 #: Administrators. |
51 work = db.ReferenceProperty(reference_class=soc.models.work.Work, required=True, |
51 work = db.ReferenceProperty(reference_class=models.work.Work, required=True, |
52 collection_name="proposal") |
52 collection_name="proposal") |
53 |
53 |
54 #: a many:1 relationship of Documentation entities that pertain |
54 #: a many:1 relationship of Documentation entities that pertain |
55 #: to a single Person. The back-reference in the Person model is a |
55 #: to a single Person. The back-reference in the Person model is a |
56 #: Query named 'docs'. |
56 #: Query named 'docs'. |
57 person = db.ReferenceProperty(reference_class=soc.models.person.Person, |
57 person = db.ReferenceProperty(reference_class=models.person.Person, |
58 collection_name="docs") |
58 collection_name="docs") |
59 |
59 |
60 #: An optional db.BlobProperty containing the documentation |
60 #: An optional db.BlobProperty containing the documentation |
61 #: (usually a scanned image of a paper document or a PDF file). |
61 #: (usually a scanned image of a paper document or a PDF file). |
62 attachment = db.BlobProperty() |
62 attachment = db.BlobProperty() |