sdi/forms.py
branchanoop
changeset 56 7dfacad8adee
parent 45 29d7d70c9273
child 68 b0e630caa6e6
equal deleted inserted replaced
55:1091f42e4a41 56:7dfacad8adee
   133             else:
   133             else:
   134                  raise forms.ValidationError("Invalid range for Likeliness of attending the workshop")
   134                  raise forms.ValidationError("Invalid range for Likeliness of attending the workshop")
   135         else:
   135         else:
   136             raise forms.ValidationError("Invalid range for Likeliness of attending the workshop")
   136             raise forms.ValidationError("Invalid range for Likeliness of attending the workshop")
   137                    
   137                    
       
   138 class EmailForm(forms.Form):
       
   139     """ Take a list of csv seperated email addresses.
       
   140     """
       
   141 
       
   142     emails = forms.CharField(widget=forms.Textarea, required=False)
       
   143 
       
   144     def clean_emails(self):
       
   145         emails = self.cleaned_data['emails']
       
   146 
       
   147         to_emails = [csv_list.split(',') for csv_list in emails.split()]
       
   148         return to_emails
       
   149