Skip to content

Commit

Permalink
Merge #141 (add 3 more fields to CFP form).
Browse files Browse the repository at this point in the history
  • Loading branch information
martey committed Jan 25, 2017
2 parents 2c21213 + cccb7ec commit 8115c35
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
3 changes: 3 additions & 0 deletions conf_site/proposals/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ class Meta:
"audience_level",
"description",
"abstract",
"first_time_at_pydata",
"affiliation",
"under_represented_population",
"under_represented_details",
"additional_notes",
"recording_release",
"phone_number",
]
widgets = {
"abstract": MarkItUpWidget(),
Expand Down
30 changes: 30 additions & 0 deletions conf_site/proposals/migrations/0004_add_three_fields_to_cfp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-01-25 06:44
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('proposals', '0003_add_disclaimer'),
]

operations = [
migrations.AddField(
model_name='proposal',
name='affiliation',
field=models.CharField(blank=True, default=b'', max_length=200),
),
migrations.AddField(
model_name='proposal',
name='first_time_at_pydata',
field=models.CharField(blank=True, choices=[(b'', b'----'), (b'Y', b'Yes'), (b'N', b'No'), (b'O', b'I would prefer not to answer')], default=b'', max_length=1, verbose_name=b'Is this your first time speaking at a PyData event?'),
),
migrations.AddField(
model_name='proposal',
name='phone_number',
field=models.CharField(blank=True, default=b'', max_length=100, verbose_name=b'Phone number - to be used for last-minute schedule changes'),
),
]
28 changes: 20 additions & 8 deletions conf_site/proposals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Proposal(ProposalBase):
AUDIENCE_LEVEL_NOVICE = 1
AUDIENCE_LEVEL_EXPERIENCED = 2
AUDIENCE_LEVEL_INTERMEDIATE = 3
UNDER_REPRESENTED_YES = "Y"
UNDER_REPRESENTED_NO = "N"
YES_NO_OTHER_YES = "Y"
YES_NO_OTHER_NO = "N"
# https://en.wikipedia.org/wiki/Bartleby,_the_Scrivener
UNDER_REPRESENTED_BARTLEBY = "O"
YES_NO_OTHER_BARTLEBY = "O"
UNDER_REPRESENTED_ETHNICITY = "E"
UNDER_REPRESENTED_AGE = "A"
UNDER_REPRESENTED_GENDER = "G"
Expand All @@ -27,11 +27,11 @@ class Proposal(ProposalBase):
(AUDIENCE_LEVEL_INTERMEDIATE, "Intermediate"),
(AUDIENCE_LEVEL_EXPERIENCED, "Experienced"),
]
UNDER_REPRESENTED_ANSWERS = (
YES_NO_OTHER_ANSWERS = (
("", "----"),
(UNDER_REPRESENTED_YES, "Yes"),
(UNDER_REPRESENTED_NO, "No"),
(UNDER_REPRESENTED_BARTLEBY, "I would prefer not to answer"),
(YES_NO_OTHER_YES, "Yes"),
(YES_NO_OTHER_NO, "No"),
(YES_NO_OTHER_BARTLEBY, "I would prefer not to answer"),
)
UNDER_REPRESENTED_DETAILED_ANSWERS = (
(UNDER_REPRESENTED_ETHNICITY, "Ethnicity"),
Expand All @@ -44,14 +44,21 @@ class Proposal(ProposalBase):

audience_level = models.IntegerField(choices=AUDIENCE_LEVELS)

first_time_at_pydata = models.CharField(
"Is this your first time speaking at a PyData event?",
choices=YES_NO_OTHER_ANSWERS,
blank=True,
default="",
max_length=1)
affiliation = models.CharField(blank=True, default="", max_length=200)
under_represented_population = models.CharField(
"Do you feel that you or your talk represent a "
"population under-represented in the Python "
"and/or Data community? In no way will this "
"data be used as part of your proposal. This will only be "
"used to gather diversity statistics in order to further "
"NumFOCUS' mission.",
choices=UNDER_REPRESENTED_ANSWERS,
choices=YES_NO_OTHER_ANSWERS,
default="",
max_length=1)
under_represented_details = MultiSelectField(
Expand All @@ -60,6 +67,11 @@ class Proposal(ProposalBase):
choices=UNDER_REPRESENTED_DETAILED_ANSWERS,
max_choices=len(UNDER_REPRESENTED_DETAILED_ANSWERS))

phone_number = models.CharField(
"Phone number - to be used for last-minute schedule changes",
blank=True,
default="",
max_length=100)
recording_release = models.BooleanField(
default=True,
help_text="By submitting your proposal, you agree to give permission "
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ wagtail==1.8
wagtailmenus==2.1.2
virtualenv==15.0.3

git+git://github.com/pydata/symposion.git@4e27380#egg=symposion
git+git://github.com/pydata/symposion.git@983ec0045f34f480059e5b2#egg=symposion

0 comments on commit 8115c35

Please sign in to comment.