Django allauth example [Errno 61] Connection refused

后端 未结 2 1393
终归单人心
终归单人心 2021-02-01 01:50

I have the following error when I run django allauth example and it tries to send an email:

File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/p         


        
相关标签:
2条回答
  • 2021-02-01 01:56

    From 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

    0 讨论(0)
  • 2021-02-01 02:05

    Alternatively if you have a social sign up, you probably do not require verification email so you can just add ACCOUNT_EMAIL_VERIFICATION = 'none' to your settings. This will automatically solve the problem.

    0 讨论(0)
提交回复
热议问题