From 84da4ca5c814a27956ae55881b9fb3e659ee4655 Mon Sep 17 00:00:00 2001
From: Tobias <tobias@localhost.localdomain>
Date: Thu, 18 Oct 2018 20:30:50 +1300
Subject: [PATCH] Miniconf changes for Kernel, Docs & Dev

---
 pinaxcon/proposals/forms.py                   | 13 ++++++++--
 .../migrations/0011_auto_20181018_1818.py     | 25 +++++++++++++++++++
 .../migrations/0012_auto_20181018_1830.py     | 20 +++++++++++++++
 pinaxcon/proposals/models.py                  | 24 ++++++++++++++++++
 4 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 pinaxcon/proposals/migrations/0011_auto_20181018_1818.py
 create mode 100644 pinaxcon/proposals/migrations/0012_auto_20181018_1830.py

diff --git a/pinaxcon/proposals/forms.py b/pinaxcon/proposals/forms.py
index 803f16d9..db49482d 100644
--- a/pinaxcon/proposals/forms.py
+++ b/pinaxcon/proposals/forms.py
@@ -103,7 +103,7 @@ class KernelProposalForm(ProposalForm):
 
     class Meta:
         model = KernelProposal
-        fields = DEFAULT_FIELDS
+        fields = TALK_FORMAT_FIELDS
 
 
 class GamesProposalForm(ProposalForm):
@@ -132,23 +132,32 @@ class GamesProposalForm(ProposalForm):
         model = GamesProposal
         fields = ['help_field', ] + TALK_FORMAT_FIELDS
 
+
 class OpenHardwareProposalForm(ProposalForm):
 
     class Meta:
         model = OpenHardwareProposal
         fields = TALK_FORMAT_FIELDS
 
+
 class OpenEdProposalForm(ProposalForm):
 
     class Meta:
         model = OpenEdProposal
         fields = DEFAULT_FIELDS
 
+
 class DevDevProposalForm(ProposalForm):
 
+    HELP_TEXT = ("The Developer Developer Miniconf is taking <strong> "
+        "20-minute</strong> talks only.")
+
+    help_field = HelpTextField(text=HELP_TEXT, label='')
+
     class Meta:
         model = DevDevProposal
-        fields = DEFAULT_FIELDS
+        fields = ['help_field', ] + DEFAULT_FIELDS
+
 
 class ArtTechProposalForm(ProposalForm):
 
diff --git a/pinaxcon/proposals/migrations/0011_auto_20181018_1818.py b/pinaxcon/proposals/migrations/0011_auto_20181018_1818.py
new file mode 100644
index 00000000..0201e46f
--- /dev/null
+++ b/pinaxcon/proposals/migrations/0011_auto_20181018_1818.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.15 on 2018-10-18 07:18
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('proposals', '0010_auto_20181006_0542'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='kernelproposal',
+            name='talk_format',
+            field=models.IntegerField(choices=[(1, 'Presentation (40-45 min)'), (2, 'Short Presentation (20-30 min)')], default=1, help_text='Please indicate your preferred talk length in the private abstract field below.'),
+        ),
+        migrations.AlterField(
+            model_name='docsproposal',
+            name='target_audience',
+            field=models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer'), (4, 'Writer')], default=1),
+        ),
+    ]
diff --git a/pinaxcon/proposals/migrations/0012_auto_20181018_1830.py b/pinaxcon/proposals/migrations/0012_auto_20181018_1830.py
new file mode 100644
index 00000000..7b6ce0f5
--- /dev/null
+++ b/pinaxcon/proposals/migrations/0012_auto_20181018_1830.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.15 on 2018-10-18 07:30
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('proposals', '0011_auto_20181018_1818'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='arttechproposal',
+            name='can_exhibit',
+            field=models.IntegerField(choices=[(1, 'I am willing and able to exhibit my project on Thursday, January 24th'), (2, "I'm unable to exhibit my project")], default=1),
+        ),
+    ]
diff --git a/pinaxcon/proposals/models.py b/pinaxcon/proposals/models.py
index 3da0af2d..42ad1096 100644
--- a/pinaxcon/proposals/models.py
+++ b/pinaxcon/proposals/models.py
@@ -68,6 +68,21 @@ class DocsProposal(Proposal):
         (3, "Lightning Talk (5-10 min)")
     ]
 
+    TARGET_USER = 1
+    TARGET_BUSINESS = 2
+    TARGET_COMMUNITY = 3
+    TARGET_DEVELOPER = 4
+    TARGET_WRITER = 4
+
+    TARGET_AUIDENCES = [
+        (TARGET_USER, "User"),
+        (TARGET_BUSINESS, "Business"),
+        (TARGET_COMMUNITY, "Community"),
+        (TARGET_DEVELOPER, "Developer"),
+        (TARGET_WRITER, "Writer"),
+    ]
+
+    target_audience = models.IntegerField(choices=TARGET_AUIDENCES, default=TARGET_USER)
     talk_format = models.IntegerField(
         choices=TALK_FORMATS,
         help_text="Please indicate your preferred talk length in the private abstract field below.")
@@ -95,6 +110,15 @@ class SysAdminProposal(Proposal):
 
 
 class KernelProposal(Proposal):
+    TALK_FORMATS = [
+        (1, "Presentation (40-45 min)"),
+        (2, "Short Presentation (20-30 min)"),
+    ]
+
+    talk_format = models.IntegerField(
+        choices=TALK_FORMATS,
+        default=1,
+        help_text="Please indicate your preferred talk length in the private abstract field below.")
 
     class Meta:
         verbose_name = "Kernel Miniconf Proposal"