Skip to content

Commit 9211877

Browse files
feat: add stuff for azure hosting
1 parent cb9c6ac commit 9211877

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed
275 Bytes
Binary file not shown.

project_cleo/settings.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from pathlib import Path
1414
import os
1515
import dj_database_url
16+
if os.path.isfile('env.py'):
17+
import env
1618

1719
if os.path.exists("env.py"):
1820
import env
@@ -28,9 +30,9 @@
2830
SECRET_KEY = os.environ.get("SECRET_KEY")
2931

3032
# SECURITY WARNING: don't run with debug turned on in production!
31-
DEBUG = True
33+
DEBUG = os.environ.get("DEBUG", "False") == "True"
3234

33-
ALLOWED_HOSTS = ['.herokuapp.com', '127.0.0.1', 'localhost']
35+
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "localhost").split(",")
3436

3537

3638
# Application definition
@@ -97,7 +99,7 @@
9799
# }
98100

99101
DATABASES = {
100-
'default': dj_database_url.parse(os.environ.get("DATABASE_URL"))
102+
"default": dj_database_url.parse(os.environ.get("DATABASE_URL"))
101103
}
102104

103105
CSRF_TRUSTED_ORIGINS = [

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ Unidecode==1.4.0
4444
urllib3==2.4.0
4545
whitenoise==6.9.0
4646
django-storages
47-
azure-storage-blob
47+
azure-storage-blob
48+
psycopg2-binary

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.12.3

0 commit comments

Comments
 (0)