Form for Open Hardware CFP (#85)
This commit is contained in:
parent
8bf3948956
commit
b66db0a4a8
4 changed files with 41 additions and 1 deletions
|
@ -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):
|
||||
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue