1

i have deployed django project finally on server and now it is working, but once i go to /admin/, i am getting 500 page but not notification.

this is what i have in settings_prod.py

from settings import *
DEBUG = TEMPLATE_DEBUG = False    
SERVER_EMAIL='my_mail@mail.com'    
DEFAULT_FROM_EMAIL='my_mail@mail.com'    
ADMINS = (
    (u'me', 'my_mail@mail.com'),
)    
MANAGERS = ADMINS

what am i doing wrong?

Do i need any SMTP setups for this? i thought, this is server mailing, so server has already everything setup to send error mails.

doniyor
  • 36,596
  • 57
  • 175
  • 260

2 Answers2

1

OK, I got it by installing sendmail on server. for those who encounters the same problem.

apt-get install sendmail

I am in Debian.

good luck

doniyor
  • 36,596
  • 57
  • 175
  • 260
0

In the official Django documentation I quickly found the solution for my environment, Apache 2.2.22 (Debian) and Django 1.9:

https://docs.djangoproject.com/en/1.9/topics/email/#console-backend

  • You must quote the relevant answer from the documentation. – Anton Unt Mar 29 '17 at 08:56
  • Everything depends on the email backend you need in your project, hence a response so incoherent. In my case, I needed to use **SMTP** mail I included the following line in settings.py: **EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'** Thanks for comment. – Juan María Calle Apr 18 '17 at 14:26