19 __authors__ = [ |
19 __authors__ = [ |
20 '"Todd Larsen" <tlarsen@google.com>', |
20 '"Todd Larsen" <tlarsen@google.com>', |
21 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
21 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
22 ] |
22 ] |
23 |
23 |
|
24 |
24 from google.appengine.ext import db |
25 from google.appengine.ext import db |
25 |
26 |
26 from soc import models |
|
27 from soc.models import base |
|
28 import soc.models.work |
27 import soc.models.work |
29 |
28 |
30 class Proposal(base.ModelWithFieldAttributes): |
29 |
|
30 class Proposal(soc.models.work.Work): |
31 """Model of a Proposal, which is a specific form of a Work. |
31 """Model of a Proposal, which is a specific form of a Work. |
|
32 |
|
33 The specific way that the properties and relations inherited from Work |
|
34 are used with a Proposal are described below. |
|
35 |
|
36 work.title: the title of the Proposal |
|
37 |
|
38 work.abstract: publicly displayed as a proposal abstract or summary |
|
39 |
|
40 work.authors: the Authors of the Work referred to by this relation |
|
41 are the authors of the Proposal |
|
42 |
|
43 work.reviews: reviews of the Proposal by Reviewers |
32 |
44 |
33 A Proposal entity participates in the following relationships implemented |
45 A Proposal entity participates in the following relationships implemented |
34 as a db.ReferenceProperty elsewhere in another db.Model: |
46 as a db.ReferenceProperty elsewhere in another db.Model: |
35 |
47 |
36 tasks) an optional 1:many relationship of Task entities using the |
48 tasks) an optional 1:many relationship of Task entities using the |
37 Proposal as their foundation. This relation is implemented as the |
49 Proposal as their foundation. This relation is implemented as the |
38 'tasks' back-reference Query of the Task model 'proposal' reference. |
50 'tasks' back-reference Query of the Task model 'proposal' reference. |
39 |
|
40 """ |
51 """ |
41 |
|
42 #: Required 1:1 relationship with a Work entity that contains the |
|
43 #: general "work" properties of the Proposal. The back-reference in the Work |
|
44 #: model is a Query named 'proposal'. |
|
45 #: |
|
46 #: work.authors: the Authors of the Work referred to by this relation |
|
47 #: are the authors of the Proposal. |
|
48 #: work.title: the title of the Proposal. |
|
49 #: work.abstract: publicly displayed as a proposal abstract or summary. |
|
50 #: work.reviews: reviews of the Proposal by Reviewers. |
|
51 work = db.ReferenceProperty(reference_class=models.work.Work, required=True, |
|
52 collection_name="proposal") |
|
53 |
52 |
54 #: Required db.TextProperty describing the proposal in detail. |
53 #: Required db.TextProperty describing the proposal in detail. |
55 #: Unlike the work.abstract, which is considered "public" information, |
54 #: Unlike the work.abstract, which is considered "public" information, |
56 #: the contents of 'details' is only to be displayed to Persons in roles |
55 #: the contents of 'details' is only to be displayed to Persons in Roles |
57 #: that have a "need to know" the details. |
56 #: that have a "need to know" the details. |
58 details = db.TextProperty(required=True) |
57 details = db.TextProperty(required=True) |
|
58 |