comparison sat_website/forms.py @ 44:d721c8ffa22a

misc updates: - check for different passwords in registration form - update overview.html and features.html - add missing pages (to be completed)
author souliane <souliane@mailoo.org>
date Tue, 27 Jan 2015 18:28:06 +0100
parents 1a0f24401866
children 62c23067e86e
comparison
equal deleted inserted replaced
43:c86737a3af94 44:d721c8ffa22a
128 current_section = sections.setdefault(field.label, []) 128 current_section = sections.setdefault(field.label, [])
129 else: 129 else:
130 current_section.append(field) 130 current_section.append(field)
131 return sections 131 return sections
132 132
133 def clean(self):
134 cleaned_data = super(RegistrationForm, self).clean()
135 email = cleaned_data.get("email")
136 email_confirmation = cleaned_data.get("email_confirmation")
137
138 if email and email_confirmation and email != email_confirmation:
139 msg = _(u"Passwords don't match.")
140 self.add_error('email_confirmation', msg)
141
133 142
134 def results(self, user_readable=True): 143 def results(self, user_readable=True):
135 """Get the results submitted by the user as a list of couple. Keep the 144 """Get the results submitted by the user as a list of couple. Keep the
136 pertinent fields and filter out the inappropriate ones. 145 pertinent fields and filter out the inappropriate ones.
137 146