+ load .env file via dotenv library
This commit is contained in:
parent
b089a2dec5
commit
1781ca53db
|
|
@ -14,6 +14,9 @@ from pathlib import Path
|
|||
|
||||
import sentry_sdk
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
|
@ -34,7 +37,6 @@ def get_secret(setting):
|
|||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = get_secret("SECRET_KEY")
|
||||
|
||||
|
||||
# External API settings
|
||||
CDEK_CLIENT_ID = get_secret("CDEK_CLIENT_ID")
|
||||
CDEK_CLIENT_SECRET = get_secret("CDEK_CLIENT_SECRET")
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ aiohttp==3.9.4
|
|||
tqdm==4.65.0
|
||||
django-debug-toolbar==4.1.0
|
||||
requests==2.31.0
|
||||
python-dotenv==1.0.1
|
||||
|
||||
# Logging
|
||||
sentry-sdk==1.34.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user