Files
@ 4dedd88225c4
Branch filter:
Location: symposion_app/pinaxcon/registrasion/forms.py - annotation
4dedd88225c4
758 B
text/x-python
Remove the blue header and clean up padding
6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 39b556b7ac4f 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 833eebc46ddb 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 6c94eb9e91ee 833eebc46ddb 39b556b7ac4f 833eebc46ddb a3474fd9cd4c 39b556b7ac4f a3474fd9cd4c a3474fd9cd4c a3474fd9cd4c a3474fd9cd4c | import models
from django import forms
class YesNoField(forms.TypedChoiceField):
def __init__(self, *a, **k):
super(YesNoField, self).__init__(
*a,
coerce=lambda x: x == 'True',
choices=((False, 'No'), (True, 'Yes')),
widget=forms.RadioSelect,
**k
)
class ProfileForm(forms.ModelForm):
''' A form for requesting badge and profile information. '''
class Meta:
model = models.AttendeeProfile
exclude = ['attendee']
field_classes = {
"of_legal_age": YesNoField,
}
widgets = {
"past_lca": forms.widgets.CheckboxSelectMultiple(),
}
class Media:
js = ("lca2017/js/profile_form.js", )
|