django 用户用信箱重置密码,在本机上调试正常。弄到apache+mod_wsgi上决是提示这个问题?怎么回事?
我是用的apache+mod_wsgi部暑的django,
在本机上都调试好了。可以正常的收到重置密码信件,也可以重置密码成功。
但是我弄到服务器上后。
在xxxx.com/accounts/password/reset/ 填写好信箱。一提示就提示这样的错误:
Environment:
Request Method: POST
Request URL: http://www.gq2018.com/accounts/password/reset/
Django Version: 1.5.3
Python Version: 2.6.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.comments',
'django.contrib.admin',
'gqinfo')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
115. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
91. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in password_reset
161. form.save(**opts)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in save
261. send_mail(subject, email, from_email, [user.email])
File "/usr/lib/python2.6/site-packages/django/core/mail/__init__.py" in send_mail
62. connection=connection).send()
File "/usr/lib/python2.6/site-packages/django/core/mail/message.py" in send
255. return self.get_connection(fail_silently).send_messages([self])
File "/usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py" in send_messages
88. new_conn_created = self.open()
File "/usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py" in open
49. local_hostname=DNS_NAME.get_fqdn())
File "/usr/lib/python2.6/smtplib.py" in __init__
239. (code, msg) = self.connect(host, port)
File "/usr/lib/python2.6/smtplib.py" in connect
295. self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python2.6/smtplib.py" in _get_socket
273. return socket.create_connection((port, host), timeout)
File "/usr/lib/python2.6/socket.py" in create_connection
567. raise error, msg
Exception Type: error at /accounts/password/reset/
Exception Value: [Errno 13] Permission denied