79617621

Date: 2025-05-12 10:22:33
Score: 1
Natty:
Report link

you should install package that its name is whitenoise and add "whitenoise.middleware.WhiteNoiseMiddleware",

and you should add bellow to setting

STATIC_ROOT = BASE_DIR / 'productionfiles'
STATIC_URL = '/static/'
STATICFILES_DIRS = [
    BASE_DIR / 'staticfiles'
]
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/login/'
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: javadshabani