diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3f11adaf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Django-WebApp/django_web_app/django_web_app/.env +Django-WebApp/env \ No newline at end of file diff --git a/django_web_app/django_web_app/.env b/django_web_app/django_web_app/.env new file mode 100644 index 00000000..b09744f4 --- /dev/null +++ b/django_web_app/django_web_app/.env @@ -0,0 +1 @@ +SECRET_KEY='@5&-q%^o=@mb@=@e%b9yz^b#l-2)w&_s0ick#=wy3kw36$z($g' \ No newline at end of file diff --git a/django_web_app/django_web_app/settings.py b/django_web_app/django_web_app/settings.py index cfaf5b2e..9f2e0564 100644 --- a/django_web_app/django_web_app/settings.py +++ b/django_web_app/django_web_app/settings.py @@ -16,11 +16,16 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +import environ +#pip install environ +env = environ.Env() +environ.Env.read_env() + # 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 = '@5&-q%^o=@mb@=@e%b9yz^b#l-2)w&_s0ick#=wy3kw36$z($g' +SECRET_KEY = env('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True