app/soc/models/org_app.py
changeset 970 8b5611d5b053
parent 936 b3e1e0c9649c
child 1149 c8d2bd7be24f
equal deleted inserted replaced
969:b12de918d660 970:8b5611d5b053
    21 ]
    21 ]
    22 
    22 
    23 
    23 
    24 from google.appengine.ext import db
    24 from google.appengine.ext import db
    25 
    25 
    26 from django.utils.translation import ugettext_lazy
    26 from django.utils.translation import ugettext
    27 
    27 
    28 import soc.models.document
    28 import soc.models.document
    29 import soc.models.group_app
    29 import soc.models.group_app
    30 import soc.models.user
    30 import soc.models.user
    31 
    31 
    39   approach.  At that time, existing OrgApplication entities will be migrated
    39   approach.  At that time, existing OrgApplication entities will be migrated
    40   (converted) to their new representations in the Datastore.
    40   (converted) to their new representations in the Datastore.
    41   """
    41   """
    42   
    42   
    43   prior_participation = db.TextProperty(required=False,
    43   prior_participation = db.TextProperty(required=False,
    44     verbose_name=ugettext_lazy(
    44     verbose_name=ugettext(
    45       'Has your group participated previously?'
    45       'Has your group participated previously?'
    46       ' If so, please summarize your involvement and any past successes'
    46       ' If so, please summarize your involvement and any past successes'
    47       ' and failures.'))
    47       ' and failures.'))
    48 
    48 
    49   prior_application = db.TextProperty(required=False,
    49   prior_application = db.TextProperty(required=False,
    50     verbose_name=ugettext_lazy(
    50     verbose_name=ugettext(
    51       'If your group has not previously participated, have you applied in'
    51       'If your group has not previously participated, have you applied in'
    52       ' the past?  If so, for what sort of participation?'))
    52       ' the past?  If so, for what sort of participation?'))
    53   
    53   
    54   license_name = db.StringProperty(required=True,
    54   license_name = db.StringProperty(required=True,
    55     verbose_name=ugettext_lazy(
    55     verbose_name=ugettext(
    56       'What license does your organization use?'))
    56       'What license does your organization use?'))
    57  
    57  
    58   ideas = db.ReferenceProperty(reference_class=soc.models.document.Document,
    58   ideas = db.ReferenceProperty(reference_class=soc.models.document.Document,
    59     required=True, collection_name='ideas_app',
    59     required=True, collection_name='ideas_app',
    60     verbose_name=ugettext_lazy(
    60     verbose_name=ugettext(
    61       'Please select the Document containing your ideas list.'))
    61       'Please select the Document containing your ideas list.'))
    62 
    62 
    63   dev_mailing_list = db.StringProperty(required=False,
    63   dev_mailing_list = db.StringProperty(required=False,
    64     verbose_name=ugettext_lazy(
    64     verbose_name=ugettext(
    65       'What is the main development mailing list for your group?'
    65       'What is the main development mailing list for your group?'
    66       ' (optional)'))
    66       ' (optional)'))
    67   dev_mailing_list.help_text = ugettext_lazy(
    67   dev_mailing_list.help_text = ugettext(
    68     'Mailing list email address, URL to sign-up page, etc.')
    68     'Mailing list email address, URL to sign-up page, etc.')
    69 
    69 
    70   backup_admin = db.ReferenceProperty(reference_class=soc.models.user.User,
    70   backup_admin = db.ReferenceProperty(reference_class=soc.models.user.User,
    71     required=False,  collection_name='backup_admin_app',
    71     required=False,  collection_name='backup_admin_app',
    72     verbose_name=ugettext_lazy(
    72     verbose_name=ugettext(
    73       'Please select your backup group administrator (if there is one).'
    73       'Please select your backup group administrator (if there is one).'
    74       ' They will be emailed to confirm, and this group will not be '
    74       ' They will be emailed to confirm, and this group will not be '
    75       ' accepted until they respond. (optional).'))
    75       ' accepted until they respond. (optional).'))
    76   backup_admin.redirect_url = soc.models.user.User.URL_NAME
    76   backup_admin.redirect_url = soc.models.user.User.URL_NAME
    77 
    77 
    78   contrib_template = db.ReferenceProperty(
    78   contrib_template = db.ReferenceProperty(
    79     reference_class=soc.models.document.Document, required=False,
    79     reference_class=soc.models.document.Document, required=False,
    80     collection_name='org_app_contrib_template',
    80     collection_name='org_app_contrib_template',
    81     verbose_name=ugettext_lazy(
    81     verbose_name=ugettext(
    82       'Please select the application template you would like contributors'
    82       'Please select the application template you would like contributors'
    83       ' to your group to use.  (optional).'))
    83       ' to your group to use.  (optional).'))
    84   contrib_template.help_text = ugettext_lazy(
    84   contrib_template.help_text = ugettext(
    85     'This template will be presented to contributors, such as students'
    85     'This template will be presented to contributors, such as students'
    86     ' and other non-member participants, when they apply to contribute'
    86     ' and other non-member participants, when they apply to contribute'
    87     ' to the organization.')
    87     ' to the organization.')
    88   contrib_template.redirect_url = soc.models.document.Document.URL_NAME
    88   contrib_template.redirect_url = soc.models.document.Document.URL_NAME
    89 
    89 
    90   contrib_disappears = db.TextProperty(required=True,
    90   contrib_disappears = db.TextProperty(required=True,
    91     verbose_text=ugettext_lazy(
    91     verbose_text=ugettext(
    92       'What is your plan for dealing with disappearing contributors?'))
    92       'What is your plan for dealing with disappearing contributors?'))
    93   contrib_disappears.help_text = ugettext_lazy(
    93   contrib_disappears.help_text = ugettext(
    94     'Contributors include students and other non-member participants.')
    94     'Contributors include students and other non-member participants.')
    95 
    95 
    96   member_disappears = db.TextProperty(required=True,
    96   member_disappears = db.TextProperty(required=True,
    97     verbose_text=ugettext_lazy(
    97     verbose_text=ugettext(
    98       'What is your plan for dealing with disappearing members?'))
    98       'What is your plan for dealing with disappearing members?'))
    99   member_disappears = ugettext_lazy(
    99   member_disappears = ugettext(
   100     'Members include mentors, admininstrators, and the like.')
   100     'Members include mentors, admininstrators, and the like.')
   101 
   101 
   102   encourage_contribs = db.TextProperty(required=True,
   102   encourage_contribs = db.TextProperty(required=True,
   103     verbose_text=ugettext_lazy(
   103     verbose_text=ugettext(
   104       'What steps will you take to encourage contributors to interact with'
   104       'What steps will you take to encourage contributors to interact with'
   105       ' your community before, during, and after the program?'))
   105       ' your community before, during, and after the program?'))
   106   encourage_contribs.help_text = contrib_disappears.help_text
   106   encourage_contribs.help_text = contrib_disappears.help_text
   107 
   107 
   108   continued_contribs = db.TextProperty(required=True,
   108   continued_contribs = db.TextProperty(required=True,
   109     verbose_text=ugettext_lazy(
   109     verbose_text=ugettext(
   110       'What will you do to ensure that your accepted contributors stick'
   110       'What will you do to ensure that your accepted contributors stick'
   111       ' with the project after the program concludes?'))
   111       ' with the project after the program concludes?'))
   112   continued_contribs.help_text = contrib_disappears.help_text
   112   continued_contribs.help_text = contrib_disappears.help_text