22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 from google.appengine.ext import db |
25 from google.appengine.ext import db |
26 |
26 |
27 import soc.models.document |
27 import soc.models.work |
28 import soc.models.quiz |
28 import soc.models.quiz |
29 import soc.models.response |
29 import soc.models.response |
30 |
30 |
31 |
31 |
32 class Proposal(soc.models.document.Document): |
32 class Proposal(soc.models.work.Work): |
33 """Model of a Proposal, which is a specific form of a Work. |
33 """Model of a Proposal, which is a specific form of a Work. |
34 |
34 |
35 The specific way that the properties and relations inherited from Work |
35 The specific way that the properties and relations inherited from Work |
36 are used with a Proposal are described below. |
36 are used with a Proposal are described below. |
37 |
37 |
38 work.title: the title of the Proposal |
38 work.title: the title of the Proposal |
39 |
39 |
40 work.abstract: publicly displayed as a proposal abstract or summary |
40 work.reviews: reviews of the Proposal by Reviewers |
41 |
41 |
42 work.reviews: reviews of the Proposal by Reviewers |
42 work.content: the details of the Proposal; which, unlike work.abstract |
43 |
43 is considered "public" information, the contents of a Proposal are only |
44 document.content: the details of the Proposal; which, unlike work.abstract |
44 displayed to Persons in Roles that have a "need to know" those details. |
45 is considered "public" information, the contents of a Proposal are only |
|
46 displayed to Persons in Roles that have a "need to know" those details. |
|
47 |
45 |
48 A Proposal entity participates in the following relationships implemented |
46 A Proposal entity participates in the following relationships implemented |
49 as a db.ReferenceProperty elsewhere in another db.Model: |
47 as a db.ReferenceProperty elsewhere in another db.Model: |
50 |
48 |
51 tasks) an optional 1:many relationship of Task entities using the |
49 tasks) an optional 1:many relationship of Task entities using the |
52 Proposal as their foundation. This relation is implemented as the |
50 Proposal as their foundation. This relation is implemented as the |
53 'tasks' back-reference Query of the Task model 'proposal' reference. |
51 'tasks' back-reference Query of the Task model 'proposal' reference. |
54 """ |
52 """ |
|
53 #: optional, indexed plain text field used for different purposes, |
|
54 #: depending on the specific type of the work |
|
55 abstract = db.StringProperty(multiline=True) |
|
56 abstract.help_text = ugettext_lazy( |
|
57 'short abstract, summary, or snippet;' |
|
58 ' 500 characters or less, plain text displayed publicly') |
|
59 |
55 #: an optional many:1 relationship between Proposal and a Quiz that |
60 #: an optional many:1 relationship between Proposal and a Quiz that |
56 #: defines what Questions were added by the prospective Proposal Reviewer |
61 #: defines what Questions were added by the prospective Proposal Reviewer |
57 #: for the Proposal author to answer. |
62 #: for the Proposal author to answer. |
58 quiz = db.ReferenceProperty(reference_class=soc.models.quiz.Quiz, |
63 quiz = db.ReferenceProperty(reference_class=soc.models.quiz.Quiz, |
59 required=False, collection_name="proposals") |
64 required=False, collection_name="proposals") |