aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gmail.com>2013-09-08 04:57:21 -0700
committerTheo Chatzimichos <tampakrap@gmail.com>2013-09-08 04:57:21 -0700
commit8d9a738fc2e132b8705b1c9b30a94e0349a040e8 (patch)
treec98802ef173f5e4220233d518460ec9ee5c10786 /okupy/accounts/forms.py
parentMerge pull request #85 from dastergon/verbosity (diff)
parentfix misc pep8 errors (diff)
downloadidentity.gentoo.org-8d9a738fc2e132b8705b1c9b30a94e0349a040e8.tar.gz
identity.gentoo.org-8d9a738fc2e132b8705b1c9b30a94e0349a040e8.tar.bz2
identity.gentoo.org-8d9a738fc2e132b8705b1c9b30a94e0349a040e8.zip
Merge pull request #86 from dastergon/misc_flake8
fix misc pep8 errors
Diffstat (limited to 'okupy/accounts/forms.py')
-rw-r--r--okupy/accounts/forms.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/okupy/accounts/forms.py b/okupy/accounts/forms.py
index 01a342a..47b66a2 100644
--- a/okupy/accounts/forms.py
+++ b/okupy/accounts/forms.py
@@ -69,7 +69,7 @@ class ProfileSettingsForm(forms.Form):
last_name = forms.CharField(
max_length=100, label='Last Name', required=False)
birthday = forms.DateField(
- input_formats='%m/%d/%Y', label='Birthday (format: month/day/year)', required=False)
+ input_formats='%m/%d/%Y', label='Birthday', required=False)
timezone = forms.ChoiceField(
choices=[(x, x) for x in pytz.common_timezones])
@@ -79,7 +79,10 @@ class PasswordSettingsForm(forms.Form):
), label='Old Password', required=False)
new_password = forms.CharField(max_length=30, widget=forms.PasswordInput(
), label='New Password', required=False)
- new_password_verify = forms.CharField(max_length=30, widget=forms.PasswordInput(), label='Repeat New Password', required=False)
+ new_password_verify = forms.CharField(max_length=30,
+ widget=forms.PasswordInput(),
+ label='Repeat New Password',
+ required=False)
def clean(self):
cleaned_data = super(PasswordSettingsForm, self).clean()
@@ -90,14 +93,18 @@ class PasswordSettingsForm(forms.Form):
raise forms.ValidationError(
'Please enter your current password to change the password.')
elif new_password != new_password_verify:
- raise forms.ValidationError('Passsword verification failed. Please re-enter the new password.')
+ raise forms.ValidationError(
+ "Paswords don't match. Please enter passwords again.")
elif (old_password and new_password) and (not new_password_verify):
- raise forms.ValidationError('Password verification failed. Please repeat your new password.')
+ raise forms.ValidationError(
+ 'Password verification failed. Please repeat your passwords.')
return cleaned_data
class EmailSettingsForm(forms.Form):
- email = forms.EmailField(max_length=254, label='Add Email', help_text='A valid email address, please.', required=False)
+ email = forms.EmailField(max_length=254, label='Add Email',
+ help_text='A valid email address, please.',
+ required=False)
class ContactSettingsForm(forms.Form):