From 10b6358b9271e3ff9ff6cffbbb3c69e9912a78cd Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Sun, 2 Jul 2017 22:28:29 +1000 Subject: [PATCH] Add release materials check boxes to miniconf proposal We need to have people who are submitting a miniconf proposal agree to releasing the material. The easiest way to do this is to just make it a proposal like the other two types. We don't have audience type for miniconf, instead of deleting it just have a default - it's easier. WARNING: This requires a real migration to be performed before use. --- pinaxcon/proposals/forms.py | 2 ++ .../migrations/0003_auto_20170702_2227.py | 30 +++++++++++++++++++ pinaxcon/proposals/models.py | 5 +++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pinaxcon/proposals/migrations/0003_auto_20170702_2227.py diff --git a/pinaxcon/proposals/forms.py b/pinaxcon/proposals/forms.py index 79ec73ad..ac4abd5d 100644 --- a/pinaxcon/proposals/forms.py +++ b/pinaxcon/proposals/forms.py @@ -61,4 +61,6 @@ class MiniconfProposalForm(ProposalForm): "abstract", "private_abstract", "technical_requirements", + "recording_release", + "materials_release", ] diff --git a/pinaxcon/proposals/migrations/0003_auto_20170702_2227.py b/pinaxcon/proposals/migrations/0003_auto_20170702_2227.py new file mode 100644 index 00000000..ddb34579 --- /dev/null +++ b/pinaxcon/proposals/migrations/0003_auto_20170702_2227.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.3 on 2017-07-02 12:27 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('proposals', '0002_auto_20170702_1140'), + ] + + operations = [ + migrations.AddField( + model_name='miniconfproposal', + name='materials_release', + field=models.BooleanField(default=True, help_text="I allow Linux Australia to release any other material (such as slides) from presentations covered by this proposal, under the Creative Commons Attribution-Share Alike Australia 3.0 Licence"), + ), + migrations.AddField( + model_name='miniconfproposal', + name='recording_release', + field=models.BooleanField(default=True, help_text="I allow Linux Australia to release any recordings of presentations covered by this proposal, under the Creative Commons Attribution-Share Alike Australia 3.0 Licence"), + ), + migrations.AddField( + model_name='miniconfproposal', + name='target_audience', + field=models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer')], default=4), + ), + ] diff --git a/pinaxcon/proposals/models.py b/pinaxcon/proposals/models.py index 0fc53891..6a985577 100644 --- a/pinaxcon/proposals/models.py +++ b/pinaxcon/proposals/models.py @@ -52,7 +52,10 @@ class TutorialProposal(Proposal): verbose_name = "tutorial proposal" -class MiniconfProposal(ProposalBase): +class MiniconfProposal(Proposal): + + target_audience = models.IntegerField(choices=Proposal.TARGET_AUIDENCES, + default=Proposal.TARGET_DEVELOPER) class Meta: verbose_name = "miniconf proposal"