From 42aeeb569b2dd1619234b65383c8f593ad27935d Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 5 Feb 2018 11:26:30 +0100 Subject: [PATCH] secret settings --- .gitignore | 2 + .idea/Recipies.iml | 2 +- .idea/dictionaries/vabene1111.xml | 7 + .idea/misc.xml | 2 +- .idea/workspace.xml | 244 ++++++++++++------------------ Recipies/secret_settings.template | 29 ++++ Recipies/settings.py | 17 +-- 7 files changed, 140 insertions(+), 163 deletions(-) create mode 100644 .idea/dictionaries/vabene1111.xml create mode 100644 Recipies/secret_settings.template diff --git a/.gitignore b/.gitignore index 15c1c10c3..5e14c3dcb 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ target/ \.idea/dataSources\.local\.xml venv/ + +Recipies/secret_settings\.py diff --git a/.idea/Recipies.iml b/.idea/Recipies.iml index 9a80dc366..7a827bde2 100644 --- a/.idea/Recipies.iml +++ b/.idea/Recipies.iml @@ -15,7 +15,7 @@ - + diff --git a/.idea/dictionaries/vabene1111.xml b/.idea/dictionaries/vabene1111.xml new file mode 100644 index 000000000..a0d84d941 --- /dev/null +++ b/.idea/dictionaries/vabene1111.xml @@ -0,0 +1,7 @@ + + + + dropbox + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index ce57ca017..b3e4b45be 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 162cd8933..3e2f13489 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,14 @@ - - - + + + + + + + + @@ -268,19 +276,18 @@ - + - - + - + - + @@ -289,6 +296,7 @@ + @@ -314,35 +322,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - @@ -350,7 +333,9 @@ - + + + @@ -358,7 +343,6 @@ - @@ -373,7 +357,6 @@ - @@ -406,7 +389,6 @@ - @@ -414,7 +396,6 @@ - @@ -422,9 +403,7 @@ - - - + @@ -452,7 +431,6 @@ - @@ -477,9 +455,6 @@ - - - @@ -498,68 +473,25 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - + - - - - - - - - - - - - - - - - - + + @@ -572,7 +504,6 @@ - @@ -580,7 +511,6 @@ - @@ -588,7 +518,6 @@ - @@ -596,9 +525,6 @@ - - - @@ -606,7 +532,6 @@ - @@ -614,29 +539,58 @@ + + + + + + + - + - - + + + + + + + + + + + + + + + + + + - + - + - - - - - + + + + + + + + + + + diff --git a/Recipies/secret_settings.template b/Recipies/secret_settings.template new file mode 100644 index 000000000..eafa6b02e --- /dev/null +++ b/Recipies/secret_settings.template @@ -0,0 +1,29 @@ +""" +Setting file for secret settings +imported by settings.py + +TEMPLATE FILE: remove .template extension and fill in missing values +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +# defined in secret settings to be able to use local sqlite db's +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '' + +# Database +# https://docs.djangoproject.com/en/2.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +# Dropbox API access token +# see https://www.dropbox.com/developers/documentation/http/documentation for more info +DROPBOX_API_KEY = "" diff --git a/Recipies/settings.py b/Recipies/settings.py index 18f58ce58..fd6e4dece 100644 --- a/Recipies/settings.py +++ b/Recipies/settings.py @@ -11,16 +11,11 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +from Recipies.secret_settings import * # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '3*2&bz92brcnq^3c9b=_g%sc3b(i1j#rs*%1k67c8=cy2397j3' - # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -77,16 +72,6 @@ TEMPLATES = [ WSGI_APPLICATION = 'Recipies.wsgi.application' -# Database -# https://docs.djangoproject.com/en/2.0/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.0/ref/settings/#auth-password-validators