aboutsummaryrefslogtreecommitdiffstats
path: root/backend/constants.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-10-25 19:49:22 +0000
committerGravatar Joe Banks <[email protected]>2020-10-25 19:49:22 +0000
commita38a7ea2677ad747605b36dcd6889c32c2eaf566 (patch)
tree6198ca9b9de4fcdce5d6e149279f867e5576c95f /backend/constants.py
parentAdd project files for poetry (diff)
Add constants
Diffstat (limited to 'backend/constants.py')
-rw-r--r--backend/constants.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/backend/constants.py b/backend/constants.py
new file mode 100644
index 0000000..746e277
--- /dev/null
+++ b/backend/constants.py
@@ -0,0 +1,17 @@
+from dotenv import load_dotenv
+load_dotenv()
+
+import os # noqa
+import binascii # noqa
+
+DATABASE_URL = os.getenv("DATABASE_URL")
+MONGO_DATABASE = os.getenv("MONGO_DATABASE", "pydis_forms")
+
+OAUTH2_CLIENT_ID = os.getenv("OAUTH2_CLIENT_ID")
+OAUTH2_CLIENT_SECRET = os.getenv("OAUTH2_CLIENT_SECRET")
+OAUTH2_REDIRECT_URI = os.getenv(
+ "OAUTH2_REDIRECT_URI",
+ "http://forms.pythondiscord.com/callback"
+)
+
+SECRET_KEY = os.getenv("SECRET_KEY", binascii.hexlify(os.urandom(30)).decode())