All pastes #983323 Raw Edit

Someone

public text v1 · immutable
·published 2008-04-13 07:55 UTC
rendered paste body
class SpeakerForm(forms.Form):
    cat_objects = list()
    audience_objects = list()

    for cat in Category.objects.all():
        cat_objects.append((cat.pk,cat.name))
        
    for audience in AudienceType.objects.all():
        audience_objects.append((audience.pk,audience.name))
        
    category = forms.ChoiceField(cat_objects)
    audience = forms.MultipleChoiceField(audience_objects)
    title = forms.CharField()
    short_abstract = forms.CharField(widget=forms.Textarea,min_length=1,max_length=5000,help_text="A short abstract less than 500 words")