diff options
author | coderick14 | 2017-06-13 01:28:28 +0530 |
---|---|---|
committer | coderick14 | 2017-06-13 01:28:28 +0530 |
commit | d6229e143cedb011e5cad999245509cd2727039e (patch) | |
tree | b32280fa8c59916a1389e940243c00a0adbf17f2 | |
parent | c6807a170dad16e89b2a736f90065b23a57c0b55 (diff) | |
download | SBHS-2018-Rpi-d6229e143cedb011e5cad999245509cd2727039e.tar.gz SBHS-2018-Rpi-d6229e143cedb011e5cad999245509cd2727039e.tar.bz2 SBHS-2018-Rpi-d6229e143cedb011e5cad999245509cd2727039e.zip |
Remove database credentials from settings.py
-rw-r--r-- | sbhs_server/credentials.py.example | 8 | ||||
-rw-r--r-- | sbhs_server/settings.py | 17 |
2 files changed, 13 insertions, 12 deletions
diff --git a/sbhs_server/credentials.py.example b/sbhs_server/credentials.py.example index 255bbae..4597033 100644 --- a/sbhs_server/credentials.py.example +++ b/sbhs_server/credentials.py.example @@ -3,4 +3,10 @@ EMAIL_HOST_USER = 'username' EMAIL_HOST_PASSWORD = 'password' MAP_FILE = 'path/to/file/map_machine_ids.txt' LOG_FILE = '/path/to/logfile' -ADMIN_EMAIL='admin email'
\ No newline at end of file +ADMIN_EMAIL='admin email' +DB_NAME = 'your database name' +DB_USER = 'database username' +DB_PASS = 'password' +DB_HOST = 'database host' +DB_PORT = 'database port' + diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py index 7c03dfa..3625fc1 100644 --- a/sbhs_server/settings.py +++ b/sbhs_server/settings.py @@ -62,8 +62,7 @@ INSTALLED_APPS = ( 'undelete', #'yaksh', 'taggit', - #'corsheaders' - 'django_crontab', + #'corsheaders', 'account', 'myadmin', @@ -99,11 +98,11 @@ if is_production: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'database_name', - 'USER': 'username', - 'PASSWORD': 'password', - 'HOST': 'localhost', - 'PORT': '3306', + 'NAME': credentials.DB_NAME, + 'USER': credentials.DB_USER, + 'PASSWORD': credentials.DB_PASS, + 'HOST': credentials.DB_HOST, + 'PORT': credentials.DB_PORT, } } else: @@ -186,10 +185,6 @@ TEMPLATES = [ }, ] -CRONJOBS = [ - ('2 * * * *', 'maintenance.health_monitor.main', '>> /tmp/health_monitor.log'), -] - import warnings warnings.filterwarnings( 'ignore', r"DateTimeField .* received a naive datetime", |