diff --git a/.env.example b/.env.example index 2f7f265..98a6a7b 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,17 @@ -COMIC_BOOK_VOLUME \ No newline at end of file +DJANGO_SECRET_KEY = 'Please set me correctly' + +DJANGO_DEBUG = False + +DJANGO_ALLOWED_HOSTS = 'localhost' + +# pip install psycopg2-binary +DATABASE_URL = 'postgres://{user}:{password}@{hostname}:{port}/{database-name}' + +# This expects the office winrar unrar command line tool for windows or linux. +# Will work without setting if it is in the path +# UNRAR_TOOL = 'unrar.exe' + +# for google recaptcha 2 +# DJANGO_CBREADER_USE_RECAPTCHA = True +# DJANGO_RECAPTCHA_PRIVATE_KEY = '' +# DJANGO_RECAPTCHA_PUBLIC_KEY = '' \ No newline at end of file diff --git a/cbreader/settings/base.py b/cbreader/settings/base.py index 0a77d34..30e248a 100644 --- a/cbreader/settings/base.py +++ b/cbreader/settings/base.py @@ -1,13 +1,5 @@ """ Django settings for cbreader project. - -Generated by 'django-admin startproject' using Django 1.8.2. - -For more information on this file, see -https://docs.djangoproject.com/en/1.8/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) @@ -22,7 +14,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__fil # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "=3tf-@u1t7x4%$yr++59+8tspl4ao&r3&!bb6l(t&$#6@bfkwg" +SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "9!u#3b@%&vhmh2f89l+tl6r30ce_c&e22bc3l8jx_7#mybxbdq") # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.environ.get("DJANGO_DEBUG", True) @@ -114,10 +106,10 @@ LOGIN_REDIRECT_URL = "/comic/" LOGIN_URL = "/login/" -UNRAR_TOOL = os.getenv("UNRAR_TOOL", None) +UNRAR_TOOL = os.getenv("DJANGO_UNRAR_TOOL", None) -CBREADER_USE_RECAPTCHA = False -RECAPTCHA_PRIVATE_KEY = "" -RECAPTCHA_PUBLIC_KEY = "" +CBREADER_USE_RECAPTCHA = os.getenv("DJANGO_CBREADER_USE_RECAPTCHA", False) +RECAPTCHA_PRIVATE_KEY = os.getenv("DJANGO_RECAPTCHA_PRIVATE_KEY", '') +RECAPTCHA_PUBLIC_KEY = os.getenv("DJANGO_RECAPTCHA_PUBLIC_KEY", '') COMIC_DIR = "/media/comics"