Skip to content

Commit fc021c6

Browse files
committed
Update settings
1 parent 71ec18b commit fc021c6

File tree

4 files changed

+40
-11
lines changed

4 files changed

+40
-11
lines changed

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ poetry install
99
python manage.py collectstatic --no-input
1010

1111
# Apply any outstanding database migrations
12+
python manage.py makemigrations
1213
python manage.py migrate

config/settings.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
SECRET_KEY = env("SECRET_KEY")
1717

1818
# SECURITY WARNING: don't run with debug turned on in production!
19-
DEBUG = env.bool("DEBUG")
19+
DEBUG = env.bool("DEBUG", default=False)
20+
print(DEBUG)
2021

21-
if DEBUG:
22-
ALLOWED_HOSTS = []
23-
else:
24-
ALLOWED_HOSTS = ["127.0.0.1", "localhost", "*"]
22+
ALLOWED_HOSTS = ["127.0.0.1", "localhost", "django-blog-pgu8.onrender.com"]
2523

2624

2725
# Application definition
@@ -47,6 +45,7 @@
4745
"debug_toolbar",
4846
"social_django",
4947
"tinymce",
48+
"whitenoise.runserver_nostatic",
5049
]
5150

5251
MIDDLEWARE = [
@@ -227,8 +226,7 @@
227226
}
228227

229228
# whitenoise configuration
230-
STORAGES = {
231-
"staticfiles": {
232-
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
233-
},
234-
}
229+
STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage"
230+
231+
CSRF_COOKIE_SECURE = True
232+
SESSION_COOKIE_SECURE = True

poetry.lock

Lines changed: 30 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ whitenoise = "^6.7.0"
1919
psycopg2-binary = "^2.9.9"
2020
dj-database-url = "^2.2.0"
2121
gunicorn = "^22.0.0"
22+
uvicorn = "^0.30.1"
2223

2324

2425
[tool.poetry.group.dev.dependencies]

0 commit comments

Comments
 (0)