From f95b7b1c41c5c06dfb8365d5cdf151a142c4e5a4 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Thu, 3 Jun 2021 09:51:54 +0100 Subject: [PATCH] Update allowed hosts and formatting --- borgweb/borgweb/production.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/borgweb/borgweb/production.py b/borgweb/borgweb/production.py index 4c738ff..21bcefb 100644 --- a/borgweb/borgweb/production.py +++ b/borgweb/borgweb/production.py @@ -7,15 +7,15 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = __SECRET_KEY -DEBUG = False +DEBUG = False AXES_LOCKOUT_CALLABLE = "borg.views.axes" -ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'george.ooo', 'www.george.ooo', 'borg.george.ooo'] +ALLOWED_HOSTS = ['127.0.0.1', 'borg.george.ooo'] AUTHENTICATION_BACKENDS = [ - 'axes.backends.AxesBackend', - 'django.contrib.auth.backends.ModelBackend', + 'axes.backends.AxesBackend', + 'django.contrib.auth.backends.ModelBackend', ] INSTALLED_APPS = [ @@ -70,7 +70,6 @@ DATABASES = { } } - AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', @@ -96,24 +95,23 @@ USE_L10N = True USE_TZ = False - STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'compressor.finders.CompressorFinder' - ] -COMPRESS_PRECOMPILERS = (('text/x-scss', 'django_libsass.SassCompiler'),) + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder' +] COMPRESS_ENABLED = True COMPRESS_OFFLINE = True LIBSASS_OUTPUT_STYLE = 'compressed' +COMPRESS_PRECOMPILERS = (('text/x-scss', 'django_libsass.SassCompiler'),) STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'root') STATICFILES_DIRS = [ - os.path.join(BASE_DIR, 'static'), + os.path.join(BASE_DIR, 'static'), ] DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' @@ -130,9 +128,7 @@ CACHES = { } } - # security SESSION_COOKIE_SECURE = True SECURE_SSL_REDIRECT = True CSRF_COOKIE_SECURE = True -