Add OpenEd fields
This commit is contained in:
parent
c62823301b
commit
d49aeefc17
3 changed files with 42 additions and 2 deletions
|
@ -141,10 +141,12 @@ class OpenHardwareProposalForm(ProposalForm):
|
||||||
|
|
||||||
|
|
||||||
class OpenEdProposalForm(ProposalForm):
|
class OpenEdProposalForm(ProposalForm):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
NO_TARGET_AUDIENCE_FIELDS = copy.copy(TALK_FORMAT_FIELDS)
|
||||||
|
del(NO_TARGET_AUDIENCE_FIELDS[1])
|
||||||
|
|
||||||
model = OpenEdProposal
|
model = OpenEdProposal
|
||||||
fields = DEFAULT_FIELDS
|
fields = NO_TARGET_AUDIENCE_FIELDS
|
||||||
|
|
||||||
|
|
||||||
class DevDevProposalForm(ProposalForm):
|
class DevDevProposalForm(ProposalForm):
|
||||||
|
|
26
pinaxcon/proposals/migrations/0013_auto_20181023_1914.py
Normal file
26
pinaxcon/proposals/migrations/0013_auto_20181023_1914.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.15 on 2018-10-23 08:14
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('proposals', '0012_auto_20181018_1830'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='openedproposal',
|
||||||
|
name='talk_format',
|
||||||
|
field=models.IntegerField(choices=[(1, 'Presentation (40-45 min)'), (2, 'Short Presentation (20-30 min)'), (3, 'Lightning Talk (5-10 min)')], default=1, help_text='Please indicate your preferred talk length in the private abstract field below.'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='openedproposal',
|
||||||
|
name='target_audience',
|
||||||
|
field=models.IntegerField(blank=True, null=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -161,6 +161,18 @@ class OpenHardwareProposal(Proposal):
|
||||||
|
|
||||||
|
|
||||||
class OpenEdProposal(Proposal):
|
class OpenEdProposal(Proposal):
|
||||||
|
TALK_FORMATS = [
|
||||||
|
(1, "Presentation (40-45 min)"),
|
||||||
|
(2, "Short Presentation (20-30 min)"),
|
||||||
|
(3, "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.")
|
||||||
|
|
||||||
|
# Can't delete an inherited field
|
||||||
|
target_audience = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Open Education Miniconf Proposal"
|
verbose_name = "Open Education Miniconf Proposal"
|
||||||
|
|
Loading…
Reference in a new issue