From 1428bff9264b23ee244a42875a79968a9ac8465f Mon Sep 17 00:00:00 2001 From: nanoy Date: Mon, 10 Dec 2018 12:37:07 +0100 Subject: [PATCH] Implements local settings --- coopeV3/local_settings.example.py | 26 ++++++++++++++++++++++++++ coopeV3/settings.py | 24 +++--------------------- 2 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 coopeV3/local_settings.example.py diff --git a/coopeV3/local_settings.example.py b/coopeV3/local_settings.example.py new file mode 100644 index 0000000..60f7a0e --- /dev/null +++ b/coopeV3/local_settings.example.py @@ -0,0 +1,26 @@ +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'Your secret key' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = ['Server ip'] + +# Admins + +ADMINS = [] + +EMAIL_HOST = "" + +SERVER_EMAIL = "" + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +DATABASES = { + 'default': { + #'ENGINE': 'django.db.backends.sqlite3', + #'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} diff --git a/coopeV3/settings.py b/coopeV3/settings.py index bde1d67..20184c9 100644 --- a/coopeV3/settings.py +++ b/coopeV3/settings.py @@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/2.1/ref/settings/ import os +from .local_settings import * + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -19,14 +21,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '4q7i$qbv)fdz&%i@&!eb_x$x9119s8co8nx9e84@9#d8i)lso4' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = ['127.0.0.1'] - # Application definition INSTALLED_APPS = [ @@ -78,18 +72,6 @@ TEMPLATES = [ WSGI_APPLICATION = 'coopeV3.wsgi.application' - -# Database -# https://docs.djangoproject.com/en/2.1/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - - # Password validation # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators @@ -132,4 +114,4 @@ STATICFILES_DIRS = [ ] STATIC_ROOT = os.path.join(BASE_DIR, 'static') -LOGIN_URL = '/users/login' \ No newline at end of file +LOGIN_URL = '/users/login'