try to make pylint happy
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2022-06-08 00:08:09 +02:00
parent 8610e2a557
commit 98a6fc3ce7
60 changed files with 565 additions and 560 deletions

View File

@@ -9,13 +9,13 @@ logger = logging.getLogger(__name__)
class LoginForm(auth_forms.AuthenticationForm):
username = auth_forms.UsernameField(
label=_(u'E-Mail-Adresse'),
label=_('E-Mail-Adresse'),
widget=forms.TextInput(attrs={'autofocus': True}),
)
error_messages = {
'invalid_login': _(u'Benutzername oder Passwort falsch.'),
'inactive': _("This account is inactive."),
'invalid_login': _('Benutzername oder Passwort falsch.'),
'inactive': _('This account is inactive.'),
}
def clean_username(self):
@@ -24,18 +24,18 @@ class LoginForm(auth_forms.AuthenticationForm):
class SetPasswordForm(forms.Form):
new_password = forms.CharField(label=_(u'Neues Passwort'),
new_password = forms.CharField(label=_('Neues Passwort'),
widget=forms.PasswordInput)
new_password_repeat = forms.CharField(label=_(u'Neues Passwort wiederholen'),
new_password_repeat = forms.CharField(label=_('Neues Passwort wiederholen'),
widget=forms.PasswordInput)
send_password_mail = forms.BooleanField(required=False,
initial=False,
label=_(u'Neues Passwort per E-Mail zusenden'),
label=_('Neues Passwort per E-Mail zusenden'),
)
def __init__(self, user, *args, **kwargs):
self.user = user
super(SetPasswordForm, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def clean_new_password(self):
password = self.cleaned_data.get('new_password')
@@ -48,7 +48,7 @@ class SetPasswordForm(forms.Form):
if password1 and password2:
if password1 != password2:
raise forms.ValidationError(
ugettext(u'Passwörter stimmen nicht überein'),
ugettext('Passwörter stimmen nicht überein'),
code='password_mismatch',
)
return password2
@@ -63,7 +63,7 @@ class SetPasswordForm(forms.Form):
class CreateAndSendPasswordForm(forms.Form):
username = auth_forms.UsernameField(
label=_(u'E-Mail-Adresse'),
label=_('E-Mail-Adresse'),
widget=forms.TextInput(attrs={'autofocus': True}),
)