diff --git a/README.md b/README.md index c9d1344..e049cce 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Make sure you are using a virtual environment of some sort (e.g. `virtualenv` or npm install pip install -r requirements.txt ./manage.py migrate -./manage.py loaddata sites conference sponsor_levels sponsor_benefits proposal_base pages +./manage.py loaddata sites conference sponsor_levels sponsor_benefits proposal_base pages audience ./manage.py sitetree_resync_apps ilpycon ./manage.py compilemessages diff --git a/fixtures/audience.json b/fixtures/audience.json new file mode 100644 index 0000000..ae09439 --- /dev/null +++ b/fixtures/audience.json @@ -0,0 +1,37 @@ +[ + { + "model": "proposals.targetaudience", + "pk": 1, + "fields": { + "name": "Developers" + } + }, + { + "model": "proposals.targetaudience", + "pk": 2, + "fields": { + "name": "Users" + } + }, + { + "model": "proposals.targetaudience", + "pk": 3, + "fields": { + "name": "Integrators" + } + }, + { + "model": "proposals.targetaudience", + "pk": 4, + "fields": { + "name": "System administrators" + } + }, + { + "model": "proposals.targetaudience", + "pk": 5, + "fields": { + "name": "Other" + } + } +] diff --git a/ilpycon/proposals/admin.py b/ilpycon/proposals/admin.py index 6885d53..713786a 100644 --- a/ilpycon/proposals/admin.py +++ b/ilpycon/proposals/admin.py @@ -1,7 +1,8 @@ from django.contrib import admin -from .models import TalkProposal, TutorialProposal +from .models import TalkProposal, TutorialProposal, TargetAudience +admin.site.register(TargetAudience) admin.site.register(TalkProposal) admin.site.register(TutorialProposal) diff --git a/ilpycon/proposals/forms.py b/ilpycon/proposals/forms.py index 744d6fa..872dfa8 100644 --- a/ilpycon/proposals/forms.py +++ b/ilpycon/proposals/forms.py @@ -21,9 +21,15 @@ class Meta: fields = [ "title", "audience_level", + "duration", + "language", + "second_language", "description", "abstract", "additional_notes", + "target_audience", + "target_audience_other", + "specific_props", "recording_release", ] @@ -35,8 +41,14 @@ class Meta: fields = [ "title", "audience_level", + "duration", + "language", + "second_language", "description", "abstract", "additional_notes", + "target_audience", + "target_audience_other", + "specific_props", "recording_release", ] diff --git a/ilpycon/proposals/migrations/0002_auto_20180316_0924.py b/ilpycon/proposals/migrations/0002_auto_20180316_0924.py new file mode 100644 index 0000000..977412a --- /dev/null +++ b/ilpycon/proposals/migrations/0002_auto_20180316_0924.py @@ -0,0 +1,85 @@ +# Generated by Django 2.0.1 on 2018-03-16 09:24 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('proposals', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='TargetAudience', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=30)), + ], + options={ + 'verbose_name': 'Target Audience', + 'verbose_name_plural': 'Target Audiences', + }, + ), + migrations.AddField( + model_name='talkproposal', + name='duration', + field=models.DurationField(choices=[(datetime.timedelta(0, 1500), 'Standard 25 minutes talk.'), (datetime.timedelta(0, 2400), 'Long 40 minutes talk.'), (datetime.timedelta(0, 12600), 'Half day workshop/sprint (3.5 hours net).'), (datetime.timedelta(0, 25200), 'Full day workshop/sprint (7 hours net).')], default=datetime.timedelta(0, 1500), verbose_name='Session Duration'), + ), + migrations.AddField( + model_name='talkproposal', + name='language', + field=models.CharField(choices=[('en', 'English'), ('he', 'Hebrew')], default='en', max_length=5, verbose_name='Proposal Language'), + ), + migrations.AddField( + model_name='talkproposal', + name='second_language', + field=models.CharField(blank=True, choices=[('en', 'English'), ('he', 'Hebrew')], max_length=5, verbose_name='Propsal Lanugauge - 2nd choice'), + ), + migrations.AddField( + model_name='talkproposal', + name='specific_props', + field=models.CharField(blank=True, help_text='Any Specific Props Needed?', max_length=200, verbose_name='Specific Props'), + ), + migrations.AddField( + model_name='talkproposal', + name='target_audience_other', + field=models.CharField(blank=True, max_length=200, verbose_name='Other target audience'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='duration', + field=models.DurationField(choices=[(datetime.timedelta(0, 1500), 'Standard 25 minutes talk.'), (datetime.timedelta(0, 2400), 'Long 40 minutes talk.'), (datetime.timedelta(0, 12600), 'Half day workshop/sprint (3.5 hours net).'), (datetime.timedelta(0, 25200), 'Full day workshop/sprint (7 hours net).')], default=datetime.timedelta(0, 1500), verbose_name='Session Duration'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='language', + field=models.CharField(choices=[('en', 'English'), ('he', 'Hebrew')], default='en', max_length=5, verbose_name='Proposal Language'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='second_language', + field=models.CharField(blank=True, choices=[('en', 'English'), ('he', 'Hebrew')], max_length=5, verbose_name='Propsal Lanugauge - 2nd choice'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='specific_props', + field=models.CharField(blank=True, help_text='Any Specific Props Needed?', max_length=200, verbose_name='Specific Props'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='target_audience_other', + field=models.CharField(blank=True, max_length=200, verbose_name='Other target audience'), + ), + migrations.AddField( + model_name='talkproposal', + name='target_audience', + field=models.ManyToManyField(related_name='talkproposals', to='proposals.TargetAudience', verbose_name='Target Audience'), + ), + migrations.AddField( + model_name='tutorialproposal', + name='target_audience', + field=models.ManyToManyField(related_name='tutorialproposals', to='proposals.TargetAudience', verbose_name='Target Audience'), + ), + ] diff --git a/ilpycon/proposals/models.py b/ilpycon/proposals/models.py index 2d7de98..9a52e03 100644 --- a/ilpycon/proposals/models.py +++ b/ilpycon/proposals/models.py @@ -1,8 +1,24 @@ +from datetime import timedelta + from django.db import models +from django.conf import settings +from django.utils.translation import ugettext_lazy as _ from ilpycon.symposion.proposals.models import ProposalBase +class TargetAudience(models.Model): + + name = models.CharField(max_length=30) + + class Meta: + verbose_name = _('Target Audience') + verbose_name_plural = _('Target Audiences') + + def __str__(self): + return self.name + + class Proposal(ProposalBase): AUDIENCE_LEVEL_NOVICE = 1 @@ -15,12 +31,40 @@ class Proposal(ProposalBase): (AUDIENCE_LEVEL_EXPERIENCED, "Experienced"), ] + DURATION_CHOICES = ( + (timedelta(minutes=25), _('Standard 25 minutes talk.')), + (timedelta(minutes=40), _('Long 40 minutes talk.')), + (timedelta(hours=3.5), _('Half day workshop/sprint (3.5 hours net).')), + (timedelta(hours=7), _('Full day workshop/sprint (7 hours net).')), + ) + audience_level = models.IntegerField(choices=AUDIENCE_LEVELS) + duration = models.DurationField(choices=DURATION_CHOICES, + default=DURATION_CHOICES[0][0], + verbose_name=_('Session Duration')) + language = models.CharField(max_length=5, choices=settings.LANGUAGES, + default=settings.LANGUAGES[0][0], + verbose_name=_('Proposal Language')) + second_language = models.CharField( + max_length=5, choices=settings.LANGUAGES, blank=True, + verbose_name=_('Propsal Lanugauge - 2nd choice')) recording_release = models.BooleanField( default=True, - help_text="By submitting your proposal, you agree to give permission to the conference organizers to record, edit, and release audio and/or video of your presentation. If you do not agree to this, please uncheck this box." - ) + help_text=_("By submitting your proposal, you agree to give permission " + "to the conference organizers to record, edit, and release " + "audio and/or video of your presentation. If you do not " + "agree to this, please uncheck this box.")) + + target_audience = models.ManyToManyField(TargetAudience, + related_name='%(class)ss', + verbose_name=_('Target Audience')) + target_audience_other = models.CharField( + max_length=200, blank=True, verbose_name=_('Other target audience')) + + specific_props = models.CharField( + max_length=200, blank=True, verbose_name=_('Specific Props'), + help_text=_('Any Specific Props Needed?')) class Meta: abstract = True diff --git a/ilpycon/symposion/speakers/migrations/0002_auto_20180316_0809.py b/ilpycon/symposion/speakers/migrations/0002_auto_20180316_0809.py new file mode 100644 index 0000000..d8a2a28 --- /dev/null +++ b/ilpycon/symposion/speakers/migrations/0002_auto_20180316_0809.py @@ -0,0 +1,23 @@ +# Generated by Django 2.0.1 on 2018-03-16 08:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('symposion_speakers', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='speaker', + name='financial_assistance', + field=models.BooleanField(default=False, verbose_name='Financial Assistance Needed?'), + ), + migrations.AddField( + model_name='speaker', + name='phone_number', + field=models.CharField(blank=True, max_length=20, null=True, verbose_name='Contact Phone number'), + ), + ] diff --git a/ilpycon/symposion/speakers/models.py b/ilpycon/symposion/speakers/models.py index e9a08c0..8757127 100644 --- a/ilpycon/symposion/speakers/models.py +++ b/ilpycon/symposion/speakers/models.py @@ -24,6 +24,10 @@ class Speaker(models.Model): name = models.CharField(verbose_name=_("Name"), max_length=100, help_text=_("As you would like it to appear in the" " conference program.")) + phone_number = models.CharField(max_length=20, null=True, blank=True, + verbose_name=_("Contact Phone number")) + financial_assistance = models.BooleanField( + default=False, verbose_name=_("Financial Assistance Needed?")) biography = models.TextField(blank=True, help_text=_("A little bit about you. Edit using " ""