From be7bf7e3a312387e71a66f0f1c0f60b2f1f92a77 Mon Sep 17 00:00:00 2001 From: Barunes Padhy Date: Sun, 9 Jun 2024 19:04:05 +0300 Subject: [PATCH] Configure django settings --- backend/backend/settings.py | 4 +++- backend/requirements.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/backend/settings.py b/backend/backend/settings.py index ebba964..fb0b6dd 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -26,7 +26,7 @@ SECRET_KEY = 'django-insecure-2qks!5e#imys-r@tp2t#%cc3!*apkfu9f-(a7t)bn%sm@@3aq+ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['localhost', '127.0.0.1', '0.0.0.0'] # Application definition @@ -142,6 +142,8 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') + + CSRF_TRUSTED_ORIGINS = [ 'http://localhost:3000', ] \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt index d30b236..67bc0b3 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -2,6 +2,7 @@ asgiref==3.8.1 bottle==0.12.25 Django==5.0.6 djangorestframework==3.15.1 +gunicorn==22.0.0 packaging==24.0 proxy_tools==0.1.0 sqlparse==0.5.0