Code style cleanups
Add keyword arguments. Sort arguments and models. Move literals to their own module. Prepend handler_ to signal handlers. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -56,8 +56,10 @@ class EmailAuthenticationForm(forms.Form):
|
||||
return self.cleaned_data
|
||||
|
||||
def check_for_test_cookie(self):
|
||||
warnings.warn('check_for_test_cookie is deprecated; ensure your login '
|
||||
'view is CSRF-protected.', DeprecationWarning)
|
||||
warnings.warn(
|
||||
'check_for_test_cookie is deprecated; ensure your login '
|
||||
'view is CSRF-protected.', DeprecationWarning
|
||||
)
|
||||
|
||||
def get_user_id(self):
|
||||
if self.user_cache:
|
||||
|
||||
@@ -6,7 +6,7 @@ from mayan.apps.smart_settings import Namespace
|
||||
|
||||
from .literals import DEFAULT_LOGIN_METHOD, DEFAULT_MAXIMUM_SESSION_LENGTH
|
||||
|
||||
namespace = Namespace(name='authentication', label=_('Authentication'))
|
||||
namespace = Namespace(label=_('Authentication'), name='authentication')
|
||||
setting_login_method = namespace.add_setting(
|
||||
global_name='AUTHENTICATION_LOGIN_METHOD', default=DEFAULT_LOGIN_METHOD,
|
||||
help_text=_(
|
||||
|
||||
Reference in New Issue
Block a user