Skip to content

Commit

Permalink
add .env file for configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dihfahsih1 committed Dec 12, 2021
1 parent 9a59661 commit 0857a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DB_HOST=localhost
DB_PORT=5432

CAPTURE=6Ld2KqYZAAAAAMpds7Y4Zw8K5L7JkcuiSopEEtBW
ALLOWED_HOSTS=127.0.0.1,www.savings-sacco.herokuapp.com

MAIL_USER =[email protected]
MAIL_HOST=smtp.gmail.com
Expand Down
5 changes: 3 additions & 2 deletions savings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import environ
import calendar
from datetime import datetime
import environ
# Initialise environment variables
env = environ.Env()

environ.Env.read_env()

SECRET_KEY = env("KEY")
DEBUG = True
ALLOWED_HOSTS = ['www.savings-sacco.herokuapp.com', '127.0.0.1']
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"])
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
Expand Down

0 comments on commit 0857a82

Please sign in to comment.