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