From e07b314951317cd0c7441eee39fbd705c2940c8d Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 13 Nov 2020 09:41:06 +0100
Subject: [PATCH] cleaning of the configuration parameters

---
 debian-files/smasch.py                 |  7 +------
 local_settings_ci.py                   |  6 ------
 local_settings_ci_sqlite.py            |  6 ------
 smash/smash/local_settings.py.template | 23 ++++++++++++-----------
 4 files changed, 13 insertions(+), 29 deletions(-)

diff --git a/debian-files/smasch.py b/debian-files/smasch.py
index 9fbe7a56..357f4639 100644
--- a/debian-files/smasch.py
+++ b/debian-files/smasch.py
@@ -17,14 +17,8 @@ DATABASES = {
 STATIC_ROOT = '/usr/lib/smasch/data/static'
 MEDIA_ROOT = '/usr/lib/smasch/data/media'
 
-LOGIN_PAGE_BACKGROUND_IMAGE = 'background.jpg'  # Path to a static file containing background image, used in login.html
-
 ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
 
-NEXMO_API_KEY = 'API_KEY'
-NEXMO_API_SECRET = 'API_SECRET'
-NEXMO_DEFAULT_FROM = 'Scheduling'  # the sender of the message (phone number or text)
-
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
@@ -61,3 +55,4 @@ LOGGING = {
     },
 }
 
+TWO_FACTOR_SMS_GATEWAY = "web.nexmo_gateway.Nexmo"
diff --git a/local_settings_ci.py b/local_settings_ci.py
index 3cd577a1..c14504d1 100644
--- a/local_settings_ci.py
+++ b/local_settings_ci.py
@@ -28,10 +28,4 @@ DATABASES = {
 STATIC_ROOT = '/tmp/static'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
 MEDIA_ROOT = '/tmp/media'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
 
-LOGIN_PAGE_BACKGROUND_IMAGE = 'background.jpg'  # Path to a static file containing background image, used in login.html
-
 ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
-
-NEXMO_API_KEY = 'API_KEY'
-NEXMO_API_SECRET = 'API_SECRET'
-NEXMO_DEFAULT_FROM = 'Scheduling'  # the sender of the message (phone number or text)
diff --git a/local_settings_ci_sqlite.py b/local_settings_ci_sqlite.py
index 0c28f79d..775e2c7d 100644
--- a/local_settings_ci_sqlite.py
+++ b/local_settings_ci_sqlite.py
@@ -17,10 +17,4 @@ DATABASES = {
 STATIC_ROOT = '/tmp/static'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
 MEDIA_ROOT = '/tmp/media'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
 
-LOGIN_PAGE_BACKGROUND_IMAGE = 'background.jpg'  # Path to a static file containing background image, used in login.html
-
 ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
-
-NEXMO_API_KEY = 'API_KEY'
-NEXMO_API_SECRET = 'API_SECRET'
-NEXMO_DEFAULT_FROM = 'Scheduling'  # the sender of the message (phone number or text)
diff --git a/smash/smash/local_settings.py.template b/smash/smash/local_settings.py.template
index c455c3b7..79c90e52 100644
--- a/smash/smash/local_settings.py.template
+++ b/smash/smash/local_settings.py.template
@@ -11,12 +11,8 @@ EMAIL_HOST_USER = ''
 EMAIL_HOST_PASSWORD = ''
 EMAIL_PORT = 25
 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
-DEFAULT_FROM_EMAIL = 'prc-scheduling-admin@uni.lu'
 
-ALLOWED_HOSTS = ['prc.parkinson.lu', 'localhost']
-
-# Database
-# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
+ALLOWED_HOSTS = ['your.domain.com', 'localhost']
 
 DATABASES = {
     'default': {
@@ -33,12 +29,15 @@ DATABASES = {
     }
 }
 
-STATIC_ROOT = '/tmp/static'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
-MEDIA_ROOT = '/tmp/media'  # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
-
-LOGIN_PAGE_BACKGROUND_IMAGE = 'background.jpg'  # Path to a static file containing background image, used in login.html
-
-NEXMO_DEFAULT_FROM = 'Scheduling'  # the sender of the message (phone number or text)
+# Warning! `/tmp` directory can be flushed in any moment;
+# use a persistent one; e.g. ~/tmp/static
+STATIC_ROOT = '~/tmp/static'
+# Warning! `/tmp` directory can be flushed in any moment;
+# use a persistent one, e.g. ~/tmp/media
+MEDIA_ROOT = '~/tmp/media'
+# Warning! `/tmp` directory can be flushed in any moment;
+# use a persistent one, e.g. ~/tmp/upload
+UPLOAD_ROOT = '~/tmp/upload'
 
 LOGGING = {
     'version': 1,
@@ -75,3 +74,5 @@ LOGGING = {
         },
     },
 }
+
+TWO_FACTOR_SMS_GATEWAY = "web.nexmo_gateway.Nexmo"
-- 
GitLab