Skip to content

Commit

Permalink
fix: don't get secret key from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Feb 21, 2025
1 parent f322e55 commit 9b5a591
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 4 additions & 1 deletion codeforlife/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def set_up_settings(service_base_dir: Path, service_name: str):
from codeforlife.settings import *
# Expose secret to django project.
MY_SECRET = secrets.MY_SECRET
SECRET_KEY = secrets.SECRET_KEY
```
Args:
Expand Down Expand Up @@ -108,6 +108,9 @@ def set_up_settings(service_base_dir: Path, service_name: str):
secrets_file.write(secrets_file_comment)

secrets = dotenv_values(secrets_path)
secrets.setdefault(
"SECRET_KEY", "XTgWqMlZCMI_E5BvCArkif9nrJIIhe_6Ic6Q_UcWJDk="
)
else:
# pylint: disable-next=import-outside-toplevel
import boto3
Expand Down
5 changes: 0 additions & 5 deletions codeforlife/settings/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ def get_databases():
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv(
"SECRET_KEY", "XTgWqMlZCMI_E5BvCArkif9nrJIIhe_6Ic6Q_UcWJDk="
)

# Auth
# https://docs.djangoproject.com/en/4.2/topics/auth/default/

Expand Down

0 comments on commit 9b5a591

Please sign in to comment.