Search code examples
djangodjango-rest-frameworkdjango-rest-auth

django user registration error with django_rest_auth package


i used django rest auth in my project,but i get these error when i try to create a new user

[WinError 10061] No connection could be made because the target machine actively refused it


Solution

  • django_rest_auth use django-allauth package to do some tasks like send an email confirmation after registration. This problem may occur when django try to send this email. You must configure a SMTP backend (check this), otherwise this error will continue.

    For development purposes you cant set some variables from django-allauth in your settings.py file to disable email verification

    ACCOUNT_CONFIRM_EMAIL_ON_GET = True # E-mail address is automatically confirmed by a GET request
    ACCOUNT_EMAIL_VERIFICATION = 'none' # Allow logins with an unverified e-mail address
    

    Check all available settings for django-allauth package here.