fix production.py

This commit is contained in:
javad committed 2026-06-20 19:40:45 +03:30
1 parent 9c2c2d91de
commit 05037793e1
3 files changed
+8

No files matched your search

+1
View File
@@ -84,6 +84,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware'
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
+6
View File
@@ -3,6 +3,12 @@ MEDIA_ROOT = BASE_DIR / 'mediafiles'
STATIC_URL = '/static/'
STATIC_ROOT = '/app/staticfiles'
#DEBUG = False
# 🚀 اضافه کردن تنظیمات ذخیره‌سازی وایت‌نویز
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
+1
View File
@@ -1,4 +1,5 @@
gunicorn==22.0.0
whitenoise==6.0.0
Django==4.2.1
djangorestframework==3.14.0
Markdown==3.4.3