Skip to content

Commit

Permalink
Make .env file in template autoenv compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyno committed Apr 4, 2019
1 parent c8d85a0 commit fb6a451
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion {{ cookiecutter.repo_name }}/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
# `src/script.py`
# ----------------------------------------------------------------
# import dotenv
# import os
#
# project_dir = os.path.join(os.path.dirname(__file__), os.pardir)
# dotenv_path = os.path.join(project_dir, '.env')
# dotenv.load_dotenv(dotenv_path)
#
# DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD")
# ----------------------------------------------------------------
#
# DO NOT ADD THIS FILE TO VERSION CONTROL!
# DO NOT ADD THIS FILE TO VERSION CONTROL IF YOU ADD SECRETS TO IT

PROJECT_NAME={{ cookiecutter.repo_name }}

if [[ "`dirname "${BASH_SOURCE}"`" == "`pwd`" && -z "`echo $VIRTUAL_ENV | grep $PROJECT_NAME`" ]]; then workon $PROJECT_NAME; fi

0 comments on commit fb6a451

Please sign in to comment.