python - Django allauth 示例 [Errno 61] 连接被拒绝

标签 python django django-allauth

当我运行 django allauth 示例并尝试发送电子邮件时出现以下错误:

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 61] Connection refused

在 OS X 10.9.1 下

最佳答案

来自 allauth documentation :

When I sign up I run into connectivity errors (connection refused et al)

You probably have not got an e-mail (SMTP) server running on the machine you are developing on. Therefore, allauth is unable to send verification mails.

You can work around this by adding the following line to settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' This will avoid the need for an SMTP server as e-mails will be printed to the console. For more information, please refer to:

https://docs.djangoproject.com/en/dev/ref/settings/#email-backend

关于python - Django allauth 示例 [Errno 61] 连接被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21563227/

相关文章:

captcha - 是否有任何解决方案可以将验证码添加到 Django-allauth?

python - Django AllAuth 自定义模板不被识别

python - libedit/readline 与 OS X 10.7 Lion 上的 ipython 3.2.2 冲突

python - 为什么带有 numexpr 的 Pandas.eval() 这么慢?

django - 模块 "django.core.context_processors"未定义 "auth"可调用请求处理器

python - 使用基于类的 View 将附加上下文变量数据传递到 allauth View 中

python - 随机选择多选选项

python正则表达式在数字与非数字相邻时添加空格

javascript - 通过ajax将数组发送到django

reactjs - 如何使用 OAuth 中的访问 token 获取 Google 用户个人资料信息?