Mercurial > public > sg101
comparison accounts/forms.py @ 794:f416f5db3d91
Improve accounts registration question 7 error message.
One potential user thought it was referring to the combo box
above it on the form, not the checkboxes.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 27 May 2014 15:06:38 -0500 |
parents | 9133b4626a4b |
children | 79a71b9d0a2a |
comparison
equal
deleted
inserted
replaced
793:fa7377d90160 | 794:f416f5db3d91 |
---|---|
170 | 170 |
171 def clean_question7(self): | 171 def clean_question7(self): |
172 answer = self.cleaned_data.get('question7') | 172 answer = self.cleaned_data.get('question7') |
173 answer.sort() | 173 answer.sort() |
174 if answer != [u'2', u'4', u'5', u'7']: | 174 if answer != [u'2', u'4', u'5', u'7']: |
175 self._validation_error("Sorry, try again", answer) | 175 self._validation_error("Please double-check your checkboxes", answer) |
176 return answer | 176 return answer |
177 | 177 |
178 def save(self): | 178 def save(self): |
179 pending_user = PendingUser.objects.create_pending_user(self.cleaned_data['username'], | 179 pending_user = PendingUser.objects.create_pending_user(self.cleaned_data['username'], |
180 self.cleaned_data['email'], | 180 self.cleaned_data['email'], |