Files @ 1de0a5d46ab9
Branch filter:

Location: CopyleftConf/copyleftconf-website/pinaxcon/proposals/ - annotation

Christopher Neugebauer
Adds ConferenceSpeaker model to Symposion
from django import forms

from .models import ConferenceSpeaker, TalkProposal

class ConferenceSpeakerForm(forms.ModelForm):

    class Meta:
        model = ConferenceSpeaker
        exclude = [

    def __init__(self, *a, **k):
        super(ConferenceSpeakerForm, self).__init__(*a, **k)
        self.fields['code_of_conduct'].required = True

class ProposalForm(forms.ModelForm):

    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 = TalkProposal
        fields = [