Games Miniconf changes

This commit is contained in:
Tobias 2018-10-06 08:43:50 +13:00
parent d9ae9e4b22
commit 665415779f
3 changed files with 46 additions and 4 deletions

View file

@ -2,6 +2,7 @@ import copy
from django import forms from django import forms
from pinaxcon.proposals.fields import HelpTextField
from pinaxcon.proposals.models import TalkProposal, TutorialProposal, MiniconfProposal from pinaxcon.proposals.models import TalkProposal, TutorialProposal, MiniconfProposal
from pinaxcon.proposals.models import SysAdminProposal, KernelProposal, OpenHardwareProposal from pinaxcon.proposals.models import SysAdminProposal, KernelProposal, OpenHardwareProposal
from pinaxcon.proposals.models import GamesProposal, DevDevProposal, ArtTechProposal from pinaxcon.proposals.models import GamesProposal, DevDevProposal, ArtTechProposal
@ -104,11 +105,30 @@ class KernelProposalForm(ProposalForm):
model = KernelProposal model = KernelProposal
fields = DEFAULT_FIELDS fields = DEFAULT_FIELDS
class GamesProposalForm(ProposalForm): class GamesProposalForm(ProposalForm):
HELP_TEXT = ("If you have <strong>any</strong> questions please contact "
"the games miniconf organisers. We're excited to hear from you! You "
"can reach us via email <a href=\"mailto:games@lca.lonely.coffee\">"
"games@lca.lonely.coffee</a> or twitter DM <a href=\"https://twitter"
".com/ducky_tape\" ref=\"noreferrer noopener\" target=\"_blank\">"
"@ducky_tape</a> and <a href=\"https://twitter.com/the_mcjones\" "
"ref=\"noreferrer noopener\" target=\"_blank\">@the_mcjones</a>.")
help_field = HelpTextField(text=HELP_TEXT, label='')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['private_abstract'].help_text = ("it would be helpful if "
"you could please include a <strong>rough</strong> (don't worry, "
"we know it might change!) Outline of your presentation, e.g. "
"'0-2mins intro, 2-5mins the problem, 5-10mins things, 10-15mins "
"stuff 15-20mins solution'.")
class Meta: class Meta:
model = GamesProposal model = GamesProposal
fields = TALK_FORMAT_FIELDS fields = ['help_field', ] + TALK_FORMAT_FIELDS
class OpenHardwareProposalForm(ProposalForm): class OpenHardwareProposalForm(ProposalForm):

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-05 19:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('proposals', '0009_docsproposal'),
]
operations = [
migrations.AlterField(
model_name='gamesproposal',
name='talk_format',
field=models.IntegerField(choices=[(1, 'Presentation (long)'), (1, 'Presentation (short)'), (3, 'Demonstration'), (4, 'Other')]),
),
]

View file

@ -103,11 +103,13 @@ class KernelProposal(Proposal):
class GamesProposal(Proposal): class GamesProposal(Proposal):
TYPE_PRESENTATION = 1 TYPE_PRESENTATION = 1
TYPE_DEMONSTRATION = 2 TYPE_SHORT_PRESENTATION = 2
TYPE_OTHER = 3 TYPE_DEMONSTRATION = 3
TYPE_OTHER = 4
TALK_FORMATS = [ TALK_FORMATS = [
(TYPE_PRESENTATION, "Presentation"), (TYPE_PRESENTATION, "Presentation (long)"),
(TYPE_PRESENTATION, "Presentation (short)"),
(TYPE_DEMONSTRATION, "Demonstration"), (TYPE_DEMONSTRATION, "Demonstration"),
(TYPE_OTHER, "Other"), (TYPE_OTHER, "Other"),
] ]