aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlos Ratis <dastergon@gentoo.org>2013-09-08 14:24:12 +0300
committerPavlos Ratis <dastergon@gentoo.org>2013-09-08 14:24:12 +0300
commit2b96f96fc8a7597eebc050d1e9ed8eef6e328496 (patch)
tree9c58101702d0ed179429783dc299b8b821e8df2f /okupy/accounts/forms.py
parentMerge pull request #84 from dastergon/split_req (diff)
downloadidentity.gentoo.org-2b96f96fc8a7597eebc050d1e9ed8eef6e328496.tar.gz
identity.gentoo.org-2b96f96fc8a7597eebc050d1e9ed8eef6e328496.tar.bz2
identity.gentoo.org-2b96f96fc8a7597eebc050d1e9ed8eef6e328496.zip
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):