From 4386b09eb1f315eebd41cf89f3618c705d018850 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Mon, 28 May 2018 12:56:06 +0100 Subject: [PATCH] Code clean up --- src/documents/mixins.py | 2 +- src/paperless/settings.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/documents/mixins.py b/src/documents/mixins.py index 4d4e9783f..949be02e8 100644 --- a/src/documents/mixins.py +++ b/src/documents/mixins.py @@ -1,4 +1,4 @@ -class Renderable(object): +class Renderable: """ A handy mixin to make it easier/cleaner to print output based on a verbosity value. diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 314edeb03..1c88c6bb8 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -92,11 +92,11 @@ MIDDLEWARE_CLASSES = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -#If AUTH is disabled, we just use our "bypass" authentication middleware -if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")): - _index = MIDDLEWARE_CLASSES.index('django.contrib.auth.middleware.AuthenticationMiddleware') - MIDDLEWARE_CLASSES[_index] = 'paperless.middleware.Middleware' - MIDDLEWARE_CLASSES.remove('django.contrib.auth.middleware.SessionAuthenticationMiddleware') +# If auth is disabled, we just use our "bypass" authentication middleware +if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")): + _index = MIDDLEWARE_CLASSES.index("django.contrib.auth.middleware.AuthenticationMiddleware") + MIDDLEWARE_CLASSES[_index] = "paperless.middleware.Middleware" + MIDDLEWARE_CLASSES.remove("django.contrib.auth.middleware.SessionAuthenticationMiddleware") ROOT_URLCONF = 'paperless.urls'