Merge branch 'python-dotenv' into 'develop'

Python dotenv

See merge request sahkoinsinoorikilta/vtmk/web2.0-backend!56
This commit is contained in:
Aarni Halinen
2022-05-19 19:23:14 +00:00
3 changed files with 20 additions and 1 deletions
Generated
+16 -1
View File
@@ -609,6 +609,17 @@ python-versions = "*"
[package.dependencies]
six = ">=1.5"
[[package]]
name = "python-dotenv"
version = "0.20.0"
description = "Read key-value pairs from a .env file and set them as environment variables"
category = "main"
optional = false
python-versions = ">=3.5"
[package.extras]
cli = ["click (>=5.0)"]
[[package]]
name = "python-http-client"
version = "3.3.7"
@@ -828,7 +839,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "88bdaaa66bdcd3e1b59a1615b200c73587807ac8639cc32b8f56b5142c35aa14"
content-hash = "737b7278d4803532c7b5aee8fa95cabba24a20c70467d58fde5ab6d63c796ecf"
[metadata.files]
attrs = [
@@ -1196,6 +1207,10 @@ python-dateutil = [
{file = "python-dateutil-2.6.0.zip", hash = "sha256:3acbef017340600e9ff8f2994d8f7afd6eacb295383f286466a6df3961e486f0"},
{file = "python_dateutil-2.6.0-py2.py3-none-any.whl", hash = "sha256:537bf2a8f8ce6f6862ad705cd68f9e405c0b5db014aa40fa29eab4335d4b1716"},
]
python-dotenv = [
{file = "python-dotenv-0.20.0.tar.gz", hash = "sha256:b7e3b04a59693c42c36f9ab1cc2acc46fa5df8c78e178fc33a8d4cd05c8d498f"},
{file = "python_dotenv-0.20.0-py3-none-any.whl", hash = "sha256:d92a187be61fe482e4fd675b6d52200e7be63a12b724abbf931a40ce4fa92938"},
]
python-http-client = [
{file = "python_http_client-3.3.7-py3-none-any.whl", hash = "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36"},
{file = "python_http_client-3.3.7.tar.gz", hash = "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0"},
+1
View File
@@ -37,6 +37,7 @@ Pillow = "^9.1.1"
sendgrid = "^6.7.0"
sentry-sdk = "^1.4.3"
django-polymorphic = "^3.1.0"
python-dotenv = "^0.20.0"
[tool.poetry.dev-dependencies]
coverage = "^5.5"
+3
View File
@@ -10,10 +10,13 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
from dotenv import load_dotenv
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sikweb.base import *
load_dotenv() # loads the configs from .env
SENTRY_DSN = os.getenv("SENTRY_DSN", "")
DEPLOY_ENV = os.getenv("DEPLOY_ENV", "production")