Files
@ 2a720bd46bb4
Branch filter:
Location: symposion_app/pinaxcon/proposals/forms.py - annotation
2a720bd46bb4
3.1 KiB
text/x-python
Tickets for LCA2021
Disable lots of inventory that does not exist for a virtual conf.
Add Swag Badge category and product.
Adjust attendee profile to hide irrelevant questions.
Disable lots of inventory that does not exist for a virtual conf.
Add Swag Badge category and product.
Adjust attendee profile to hide irrelevant questions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 9b0d83053895 9b0d83053895 04f246d85071 04f246d85071 665415779f8e 246bbcb324aa be35d21102c7 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 9b0d83053895 035a7b060f18 246bbcb324aa 39b556b7ac4f 04f246d85071 04f246d85071 8fa8fc4012a5 8fa8fc4012a5 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 04f246d85071 246bbcb324aa 04f246d85071 04f246d85071 9c986111a193 04f246d85071 9c986111a193 9c986111a193 9c986111a193 9c986111a193 9c986111a193 04f246d85071 9c986111a193 04f246d85071 4c458fd584d3 2cdb554623e5 4c458fd584d3 4c458fd584d3 4c458fd584d3 246bbcb324aa 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 2cdb554623e5 4c458fd584d3 4c458fd584d3 4c458fd584d3 246bbcb324aa 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 4c458fd584d3 10b6358b9271 10b6358b9271 4c458fd584d3 246bbcb324aa 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f 38aebda92e5f | import copy
from django import forms
from pinaxcon.proposals.fields import HelpTextField
from pinaxcon.proposals import models
DEFAULT_FIELDS = [
"title",
"target_audience",
"abstract",
"private_abstract",
"technical_requirements",
"project",
"project_url",
"recording_release",
"materials_release",
]
TALK_FORMAT_FIELDS = copy.copy(DEFAULT_FIELDS)
TALK_FORMAT_FIELDS.insert(2, "talk_format")
TALK_FORMAT_FIELDS.append("ticket_acknowledgement")
class ProposalForm(forms.ModelForm):
required_css_class = 'label-required'
def clean_description(self):
value = self.cleaned_data["description"]
if len(value) > 400:
raise forms.ValidationError(
u"The description must be less than 400 characters"
)
return value
class TalkProposalForm(ProposalForm):
class Meta:
model = models.TalkProposal
fields = [
"title",
"target_audience",
"abstract",
"private_abstract",
"technical_requirements",
"project",
"project_url",
"video_url",
"recording_release",
"materials_release",
]
class TutorialProposalForm(ProposalForm):
class Meta:
model = models.TutorialProposal
fields = [
"title",
"target_audience",
"abstract",
"private_abstract",
"technical_requirements",
"project",
"project_url",
"video_url",
"recording_release",
"materials_release",
]
class MiniconfProposalForm(ProposalForm):
class Meta:
model = models.MiniconfProposal
fields = [
"title",
"abstract",
"private_abstract",
"technical_requirements",
"recording_release",
"materials_release",
]
### LCA2020 Miniconfs
class MiniconfSessionProposalForm(ProposalForm):
def __init__(self, *a, **k):
super(MiniconfSessionProposalForm, self).__init__(*a, **k)
self.fields['ticket_acknowledgement'].required = True
GLAM_FIELDS = copy.copy(TALK_FORMAT_FIELDS)
GLAM_FIELDS.insert(3, "require_approval")
class GlamProposalForm(MiniconfSessionProposalForm):
class Meta:
model = models.GlamProposal
fields = GLAM_FIELDS
class KernelProposalForm(MiniconfSessionProposalForm):
class Meta:
model = models.KernelProposal
fields = TALK_FORMAT_FIELDS
HARDWARE_FIELDS = copy.copy(TALK_FORMAT_FIELDS)
HARDWARE_FIELDS.insert(3, "experience_level")
class OpenHardwareProposalForm(MiniconfSessionProposalForm):
def __init__(self, *a, **k):
super(OpenHardwareProposalForm, self).__init__(*a, **k)
self.fields['experience_level'].required = True
class Meta:
model = models.OpenHardwareProposal
fields = HARDWARE_FIELDS
class SysAdminProposalForm(MiniconfSessionProposalForm):
class Meta:
model = models.SysAdminProposal
fields = TALK_FORMAT_FIELDS
|