diff --git a/pinaxcon/proposals/admin.py b/pinaxcon/proposals/admin.py index 04507ca3..125ae176 100644 --- a/pinaxcon/proposals/admin.py +++ b/pinaxcon/proposals/admin.py @@ -17,6 +17,7 @@ from symposion.proposals import models as symposion_models @admin.register(models.TestingProposal) @admin.register(models.KnowledgeProposal) @admin.register(models.LawProposal) +@admin.register(models.OpenHardwareProposal) class CategoryAdmin(admin.ModelAdmin): diff --git a/pinaxcon/proposals/forms.py b/pinaxcon/proposals/forms.py index 1d910f4d..1e452a76 100644 --- a/pinaxcon/proposals/forms.py +++ b/pinaxcon/proposals/forms.py @@ -5,7 +5,7 @@ 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, TestingProposal, LawProposal +from .models import GamesProposal, TestingProposal, LawProposal, OpenHardwareProposal from .models import KnowledgeProposal class ProposalForm(forms.ModelForm): @@ -306,3 +306,26 @@ class LawProposalForm(ProposalForm): "private_abstract" : widgets.AceMarkdownEditor(), "technical_requirements" : widgets.AceMarkdownEditor(), } + +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", + ] + + widgets = { + "abstract" : widgets.AceMarkdownEditor(), + "private_abstract" : widgets.AceMarkdownEditor(), + "technical_requirements" : widgets.AceMarkdownEditor(), + } diff --git a/pinaxcon/proposals/models.py b/pinaxcon/proposals/models.py index 3c5e12ba..971b1d96 100644 --- a/pinaxcon/proposals/models.py +++ b/pinaxcon/proposals/models.py @@ -137,3 +137,18 @@ class LawProposal(Proposal): class Meta: verbose_name = "Open Law and Policy 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" diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 7d3da58a..4fa0f45c 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -284,6 +284,7 @@ PROPOSAL_FORMS = { "testing-miniconf": "pinaxcon.proposals.forms.TestingProposalForm", "knowledge-miniconf": "pinaxcon.proposals.forms.KnowledgeProposalForm", "lawpolicy-miniconf": "pinaxcon.proposals.forms.LawProposalForm", + "openhardware-miniconf": "pinaxcon.proposals.forms.OpenHardwareProposalForm", } #PINAX_PAGES_HOOKSET = "pinaxcon.hooks.PinaxPagesHookSet"