From 2a882678db5bfeb6f5323e3155cfa91d9d214b1b Mon Sep 17 00:00:00 2001 From: James Polley Date: Wed, 20 Sep 2017 22:50:39 +1000 Subject: [PATCH] (re)create miniconf proposals This is a partial revert of 6d864e8ce56b8cbb53c90c620729238181c6c8ae - plucking out the bits we want to re-use --- pinaxcon/proposals/admin.py | 4 ++ pinaxcon/proposals/forms.py | 70 ++++++++++++++++++ ...l_openhardwareproposal_sysadminproposal.py | 72 +++++++++++++++++++ pinaxcon/proposals/models.py | 58 +++++++++++++++ 4 files changed, 204 insertions(+) create mode 100644 pinaxcon/proposals/migrations/0004_gamesproposal_kernelproposal_openhardwareproposal_sysadminproposal.py diff --git a/pinaxcon/proposals/admin.py b/pinaxcon/proposals/admin.py index 9b6e5e5e..6ae698c5 100644 --- a/pinaxcon/proposals/admin.py +++ b/pinaxcon/proposals/admin.py @@ -7,6 +7,10 @@ from symposion.proposals import models as symposion_models @admin.register(models.TalkProposal) @admin.register(models.TutorialProposal) @admin.register(models.MiniconfProposal) +@admin.register(models.SysAdminProposal) +@admin.register(models.KernelProposal) +@admin.register(models.GamesProposal) +@admin.register(models.OpenHardwareProposal) class CategoryAdmin(admin.ModelAdmin): class AdditionalSpeakerInline(admin.TabularInline): diff --git a/pinaxcon/proposals/forms.py b/pinaxcon/proposals/forms.py index ac4abd5d..bf94facb 100644 --- a/pinaxcon/proposals/forms.py +++ b/pinaxcon/proposals/forms.py @@ -2,6 +2,9 @@ from django import forms from pinaxcon.proposals.models import TalkProposal, TutorialProposal, MiniconfProposal +from .models import TalkProposal, TutorialProposal, MiniconfProposal +from .models import SysAdminProposal, KernelProposal, OpenHardwareProposal +from .models import GamesProposal class ProposalForm(forms.ModelForm): @@ -64,3 +67,70 @@ class MiniconfProposalForm(ProposalForm): "recording_release", "materials_release", ] + +class SysAdminProposalForm(ProposalForm): + + class Meta: + model = SysAdminProposal + fields = [ + "title", + "talk_format", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + +class KernelProposalForm(ProposalForm): + + class Meta: + model = KernelProposal + fields = [ + "title", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + +class GamesProposalForm(ProposalForm): + + class Meta: + model = GamesProposal + fields = [ + "title", + "talk_format", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + +class OpenHardwareProposalForm(ProposalForm): + + class Meta: + model = OpenHardwareProposal + fields = [ + "title", + "talk_format", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] diff --git a/pinaxcon/proposals/migrations/0004_gamesproposal_kernelproposal_openhardwareproposal_sysadminproposal.py b/pinaxcon/proposals/migrations/0004_gamesproposal_kernelproposal_openhardwareproposal_sysadminproposal.py new file mode 100644 index 00000000..bc59bc97 --- /dev/null +++ b/pinaxcon/proposals/migrations/0004_gamesproposal_kernelproposal_openhardwareproposal_sysadminproposal.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-09-20 12:58 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('symposion_proposals', '0003_auto_20170702_2250'), + ('proposals', '0003_auto_20170702_2227'), + ] + + operations = [ + migrations.CreateModel( + name='GamesProposal', + fields=[ + ('proposalbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='symposion_proposals.ProposalBase')), + ('target_audience', models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer')])), + ('recording_release', 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")), + ('materials_release', 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")), + ('talk_format', models.IntegerField(choices=[(1, 'Presentation'), (2, 'Demonstration'), (3, 'Other')])), + ], + options={ + 'verbose_name': 'Games and FOSS Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + migrations.CreateModel( + name='KernelProposal', + fields=[ + ('proposalbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='symposion_proposals.ProposalBase')), + ('target_audience', models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer')])), + ('recording_release', 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")), + ('materials_release', 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")), + ], + options={ + 'verbose_name': 'Kernel Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + migrations.CreateModel( + name='OpenHardwareProposal', + fields=[ + ('proposalbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='symposion_proposals.ProposalBase')), + ('target_audience', models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer')])), + ('recording_release', 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")), + ('materials_release', 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")), + ('talk_format', models.IntegerField(choices=[(1, 'Presentation (20 min)'), (2, 'Lightning Talk (5 min)')])), + ], + options={ + 'verbose_name': 'Open Hardware Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + migrations.CreateModel( + name='SysAdminProposal', + fields=[ + ('proposalbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='symposion_proposals.ProposalBase')), + ('target_audience', models.IntegerField(choices=[(1, 'User'), (2, 'Business'), (3, 'Community'), (4, 'Developer')])), + ('recording_release', 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")), + ('materials_release', 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")), + ('talk_format', models.IntegerField(choices=[(1, 'Short Presentation (15-25 min)'), (2, 'Lightning Talk (5-10 min)')], help_text='Please indicate your preferred talk length in the private abstract field below.')), + ], + options={ + 'verbose_name': 'System Administration Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + ] diff --git a/pinaxcon/proposals/models.py b/pinaxcon/proposals/models.py index 6a985577..e7025013 100644 --- a/pinaxcon/proposals/models.py +++ b/pinaxcon/proposals/models.py @@ -59,3 +59,61 @@ class MiniconfProposal(Proposal): class Meta: verbose_name = "miniconf proposal" + + +class SysAdminProposal(Proposal): + + TYPE_SHORT_PRESENTATION = 1 + TYPE_LIGHTNING_TALK = 2 + + TALK_FORMATS = [ + (TYPE_SHORT_PRESENTATION, "Short Presentation (15-25 min)"), + (TYPE_LIGHTNING_TALK, "Lightning Talk (5-10 min)"), + ] + + talk_format = models.IntegerField( + choices=TALK_FORMATS, + help_text="Please indicate your preferred talk length in the private abstract field below.") + + class Meta: + verbose_name = "System Administration Miniconf Proposal" + + +class KernelProposal(Proposal): + + class Meta: + verbose_name = "Kernel Miniconf Proposal" + + +class GamesProposal(Proposal): + + TYPE_PRESENTATION = 1 + TYPE_DEMONSTRATION = 2 + TYPE_OTHER = 3 + + TALK_FORMATS = [ + (TYPE_PRESENTATION, "Presentation"), + (TYPE_DEMONSTRATION, "Demonstration"), + (TYPE_OTHER, "Other"), + ] + + talk_format = models.IntegerField(choices=TALK_FORMATS) + + class Meta: + verbose_name = "Games and FOSS Miniconf Proposal" + + +class OpenHardwareProposal(Proposal): + + TYPE_NORMAL_PRESENTATION = 1 + TYPE_LIGHTNING_TALK = 2 + + TALK_FORMATS = [ + (TYPE_NORMAL_PRESENTATION, "Presentation (20 min)"), + (TYPE_LIGHTNING_TALK, "Lightning Talk (5 min)"), + ] + + talk_format = models.IntegerField(choices=TALK_FORMATS) + + class Meta: + verbose_name = "Open Hardware Miniconf Proposal"