diff --git a/pinaxcon/proposals/admin.py b/pinaxcon/proposals/admin.py index 5282d305..04507ca3 100644 --- a/pinaxcon/proposals/admin.py +++ b/pinaxcon/proposals/admin.py @@ -14,6 +14,10 @@ from symposion.proposals import models as symposion_models @admin.register(models.WootconfProposal) @admin.register(models.KernelProposal) @admin.register(models.GamesProposal) +@admin.register(models.TestingProposal) +@admin.register(models.KnowledgeProposal) +@admin.register(models.LawProposal) + class CategoryAdmin(admin.ModelAdmin): class AdditionalSpeakerInline(admin.TabularInline): diff --git a/pinaxcon/proposals/forms.py b/pinaxcon/proposals/forms.py index ae7bfd0f..1d910f4d 100644 --- a/pinaxcon/proposals/forms.py +++ b/pinaxcon/proposals/forms.py @@ -5,7 +5,8 @@ from pinaxcon import widgets from .models import TalkProposal, TutorialProposal, MiniconfProposal from .models import SysAdminProposal, WriteTheDocsProposal, WootconfProposal from .models import KernelProposal, OpenRadioProposal, SecurityProposal -from .models import GamesProposal +from .models import GamesProposal, TestingProposal, LawProposal +from .models import KnowledgeProposal class ProposalForm(forms.ModelForm): @@ -239,3 +240,69 @@ class GamesProposalForm(ProposalForm): "private_abstract" : widgets.AceMarkdownEditor(), "technical_requirements" : widgets.AceMarkdownEditor(), } + +class TestingProposalForm(ProposalForm): + + class Meta: + model = TestingProposal + fields = [ + "title", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + + widgets = { + "abstract" : widgets.AceMarkdownEditor(), + "private_abstract" : widgets.AceMarkdownEditor(), + "technical_requirements" : widgets.AceMarkdownEditor(), + } + +class KnowledgeProposalForm(ProposalForm): + + class Meta: + model = KnowledgeProposal + fields = [ + "title", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + + widgets = { + "abstract" : widgets.AceMarkdownEditor(), + "private_abstract" : widgets.AceMarkdownEditor(), + "technical_requirements" : widgets.AceMarkdownEditor(), + } + +class LawProposalForm(ProposalForm): + + class Meta: + model = LawProposal + fields = [ + "title", + "target_audience", + "abstract", + "private_abstract", + "technical_requirements", + "project", + "project_url", + "recording_release", + "materials_release", + ] + + widgets = { + "abstract" : widgets.AceMarkdownEditor(), + "private_abstract" : widgets.AceMarkdownEditor(), + "technical_requirements" : widgets.AceMarkdownEditor(), + } diff --git a/pinaxcon/proposals/migrations/0007_knowledgeproposal_lawproposal_testingproposal.py b/pinaxcon/proposals/migrations/0007_knowledgeproposal_lawproposal_testingproposal.py new file mode 100644 index 00000000..0d5da505 --- /dev/null +++ b/pinaxcon/proposals/migrations/0007_knowledgeproposal_lawproposal_testingproposal.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-09-27 07:58 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('symposion_proposals', '0001_initial'), + ('proposals', '0006_auto_20160925_0551'), + ] + + operations = [ + migrations.CreateModel( + name='KnowledgeProposal', + 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, b'User'), (2, b'Business'), (3, b'Community'), (4, b'Developer')])), + ('recording_release', models.BooleanField(default=True, help_text=b"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=b"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': 'Open Knowledge Australia Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + migrations.CreateModel( + name='LawProposal', + 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, b'User'), (2, b'Business'), (3, b'Community'), (4, b'Developer')])), + ('recording_release', models.BooleanField(default=True, help_text=b"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=b"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': 'Open Law and Policy Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + migrations.CreateModel( + name='TestingProposal', + 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, b'User'), (2, b'Business'), (3, b'Community'), (4, b'Developer')])), + ('recording_release', models.BooleanField(default=True, help_text=b"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=b"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': 'Testing/Automation Miniconf Proposal', + }, + bases=('symposion_proposals.proposalbase',), + ), + ] diff --git a/pinaxcon/proposals/models.py b/pinaxcon/proposals/models.py index 132b4a8f..3c5e12ba 100644 --- a/pinaxcon/proposals/models.py +++ b/pinaxcon/proposals/models.py @@ -108,12 +108,12 @@ class SecurityProposal(Proposal): class GamesProposal(Proposal): - TYPE_PRESENTATION = 1 + TYPE_PRESENTATION = 1 TYPE_DEMONSTRATION = 2 TYPE_OTHER = 3 - + TALK_FORMATS = [ - (TYPE_PRESENTATION, "Presentation"), + (TYPE_PRESENTATION, "Presentation"), (TYPE_DEMONSTRATION, "Demonstration"), (TYPE_OTHER, "Other"), ] @@ -122,3 +122,18 @@ class GamesProposal(Proposal): class Meta: verbose_name = "Games and FOSS Miniconf Proposal" + +class TestingProposal(Proposal): + + class Meta: + verbose_name = "Testing/Automation Miniconf Proposal" + +class KnowledgeProposal(Proposal): + + class Meta: + verbose_name = "Open Knowledge Australia Miniconf Proposal" + +class LawProposal(Proposal): + + class Meta: + verbose_name = "Open Law and Policy Miniconf Proposal" diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index d930ce2d..641e4cf1 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -260,6 +260,9 @@ PROPOSAL_FORMS = { "security-miniconf": "pinaxcon.proposals.forms.SecurityProposalForm", "kernel-miniconf": "pinaxcon.proposals.forms.KernelProposalForm", "games-miniconf": "pinaxcon.proposals.forms.GamesProposalForm", + "testing-miniconf": "pinaxcon.proposals.forms.TestingProposalForm", + "knowledge-miniconf": "pinaxcon.proposals.forms.KnowledgeProposalForm", + "lawpolicy-miniconf": "pinaxcon.proposals.forms.LawProposalForm", } #PINAX_PAGES_HOOKSET = "pinaxcon.hooks.PinaxPagesHookSet"