Skip to content

Commit db82b9d

Browse files
committed
Added .env file to store environment variables & gitignore to prevent .env from being pushed to GitHub
1 parent 65c90f3 commit db82b9d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

text_to_speech/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore environment files
2+
.env
3+
4+
# Ignore compiled Python files
5+
*.pyc
6+
__pycache__/

text_to_speech/text_to_speech/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212

1313
from pathlib import Path
14+
from decouple import config
1415

1516
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1617
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -20,10 +21,10 @@
2021
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
2122

2223
# SECURITY WARNING: keep the secret key used in production secret!
23-
SECRET_KEY = 'django-insecure-1av7%kyih)8&%w1v5g^f$+(a$^f&p28y-pr!wns!@&5axfwg)2'
24+
SECRET_KEY = config('SECRET_KEY')
2425

2526
# SECURITY WARNING: don't run with debug turned on in production!
26-
DEBUG = True
27+
DEBUG = config('DEBUG', cast=bool)
2728

2829
ALLOWED_HOSTS = []
2930

0 commit comments

Comments
 (0)