author | Sverre Rabbelier <srabbelier@gmail.com> |
Thu, 08 Jan 2009 21:23:15 +0000 | |
changeset 785 | c740d0129cce |
parent 774 | 88a827a9b614 |
child 795 | 8914adaa93a7 |
permissions | -rw-r--r-- |
774
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
2 |
# |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
4 |
# |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
8 |
# |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
10 |
# |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
16 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
17 |
"""This module contains the Organization Application Model.""" |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
18 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
19 |
__authors__ = [ |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
20 |
'"Todd Larsen" <tlarsen@google.com>', |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
21 |
] |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
22 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
23 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
24 |
from google.appengine.ext import db |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
25 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
26 |
from django.utils.translation import ugettext_lazy |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
27 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
28 |
import soc.models.document |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
29 |
import soc.models.group_app |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
30 |
import soc.models.user |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
31 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
32 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
33 |
class OrgApplication(soc.models.group_app.GroupApplication): |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
34 |
"""Specialized questions for the Organization application. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
35 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
36 |
These questions are in addition to those in the GroupApplication Model. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
37 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
38 |
Eventually, this will be replaced with a Question/Answer/Quiz/Response |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
39 |
approach. At that time, existing OrgApplication entities will be migrated |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
40 |
(converted) to their new representations in the Datastore. |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
41 |
""" |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
42 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
43 |
license_name = db.StringProperty(required=True, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
44 |
verbose_name=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
45 |
'What license does your organization use?')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
46 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
47 |
ideas = db.ReferenceProperty(reference_class=soc.models.document.Document, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
48 |
required=True, collection_name='ideas_app', |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
49 |
verbose_name=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
50 |
'Please select the Document containing your ideas list.')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
51 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
52 |
dev_mailing_list = db.StringProperty(required=False, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
53 |
verbose_name=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
54 |
'What is the main development mailing list for your group?' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
55 |
' (optional)')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
56 |
dev_mailing_list.help_text = ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
57 |
'Mailing list email address, URL to sign-up page, etc.') |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
58 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
59 |
backup_admin = db.ReferenceProperty(reference_class=soc.models.user.User, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
60 |
required=False, collection_name='backup_admin_app', |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
61 |
verbose_name=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
62 |
'Please select your backup group administrator (if there is one).' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
63 |
' They will be emailed to confirm, and this group will not be ' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
64 |
' accepted until they respond. (optional).')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
65 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
66 |
contrib_template = db.ReferenceProperty( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
67 |
reference_class=soc.models.document.Document, required=False, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
68 |
collection_name='org_app_contrib_template', |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
69 |
verbose_name=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
70 |
'Please select the application template you would like contributors' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
71 |
' to your group to use. (optional).')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
72 |
contrib_template.help_text = ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
73 |
'This template will be presented to contributors, such as students' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
74 |
' and other non-member participants, when they apply to contribute' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
75 |
' to the organization.') |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
76 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
77 |
contrib_disappears = db.TextProperty(required=True, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
78 |
verbose_text=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
79 |
'What is your plan for dealing with disappearing contributors?')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
80 |
contrib_disappears.help_text = ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
81 |
'Contributors include students and other non-member participants.') |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
82 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
83 |
member_disappears = db.TextProperty(required=True, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
84 |
verbose_text=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
85 |
'What is your plan for dealing with disappearing members?')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
86 |
member_disappears = ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
87 |
'Members include mentors, admininstrators, and the like.') |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
88 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
89 |
encourage_contribs = db.TextProperty(required=True, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
90 |
verbose_text=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
91 |
'What steps will you take to encourage contributors to interact with' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
92 |
' your community before, during, and after the program?')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
93 |
encourage_contribs.help_text = contrib_disappears.help_text |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
94 |
|
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
95 |
continued_contribs = db.TextProperty(required=True, |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
96 |
verbose_text=ugettext_lazy( |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
97 |
'What will you do to ensure that your accepted contributors stick' |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
98 |
' with the project after the program concludes?')) |
88a827a9b614
Add hard-coded GroupApplication and OrgApplication Models.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
99 |
continued_contribs.help_text = contrib_disappears.help_text |