equal
deleted
inserted
replaced
1 from django import forms |
1 from django import forms |
2 from django.contrib.auth import authenticate |
2 from django.contrib.auth import authenticate |
3 |
3 |
4 from sage_days.sdi.models import Registrant, TOPICS_CHOICES, ParticipantInfo |
4 from sage_days.sdi.models import Registrant, TOPICS_CHOICES, ParticipantInfo, SPRINT_CHOICES |
5 from captcha.fields import CaptchaField |
5 from captcha.fields import CaptchaField |
6 |
6 |
7 class RegisterForm(forms.ModelForm): |
7 class RegisterForm(forms.ModelForm): |
8 """ The form that is displayed to user. |
8 """ The form that is displayed to user. |
9 """ |
9 """ |
179 selected_ids = self.cleaned_data['selected_users'] |
179 selected_ids = self.cleaned_data['selected_users'] |
180 return [ Registrant.objects.get(id=_) for _ in selected_ids ] |
180 return [ Registrant.objects.get(id=_) for _ in selected_ids ] |
181 |
181 |
182 return myF(post_data) if post_data else myF() |
182 return myF(post_data) if post_data else myF() |
183 |
183 |
184 class ParticipantInfoForm(forms.ModelForm): |
184 class ParticipantInfoForm(forms.Form): |
185 |
185 |
186 class Meta: |
186 has_laptop_for_sagedays = forms.ChoiceField(choices=(("Yes","Yes"), ("No", "No")) |
187 model = ParticipantInfo |
187 sprinted_already = forms.ChoiceField(choices=(("Yes","Yes"), ("No", "No")) |
188 exclude = ['participant'] |
188 will_sprint = forms.ChoiceField(choices=SPRINT_CHOICES) |
|
189 |