fix production.py
This commit is contained in:
1 parent
9c2c2d91de
commit
05037793e1
3 files changed
+8
No files matched your search
@@ -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',
|
||||
|
||||
@@ -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,4 +1,5 @@
|
||||
gunicorn==22.0.0
|
||||
whitenoise==6.0.0
|
||||
Django==4.2.1
|
||||
djangorestframework==3.14.0
|
||||
Markdown==3.4.3
|
||||
|
||||
Reference in new issue
Block a user