from django.conf import settings
from allauth.account.adapter import DefaultAccountAdapter
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter


class AccountAdapter(DefaultAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)


class SocialAccountAdapter(DefaultSocialAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)

from django.conf import settings
from allauth.account.adapter import DefaultAccountAdapter
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter


class AccountAdapter(DefaultAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)


class SocialAccountAdapter(DefaultSocialAccountAdapter):
    def is_open_for_signup(self, request, sociallogin):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)

Modify is_open_for_signup to receive 3 arguments
Modify is_open_for_signup to receive 3 arguments

SocialAccountAdapter expects a sociallogin argument.

  from django.conf import settings
  from allauth.account.adapter import DefaultAccountAdapter
  from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
  
  
  class AccountAdapter(DefaultAccountAdapter):
      def is_open_for_signup(self, request):
          return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)
  
  
  class SocialAccountAdapter(DefaultSocialAccountAdapter):
-     def is_open_for_signup(self, request):
+     def is_open_for_signup(self, request, sociallogin):
          return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)
  
Modify is_open_for_signup to receive 3 arguments
## Code Before:
from django.conf import settings
from allauth.account.adapter import DefaultAccountAdapter
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter


class AccountAdapter(DefaultAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)


class SocialAccountAdapter(DefaultSocialAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)

## Instruction:
Modify is_open_for_signup to receive 3 arguments
## Code After:
from django.conf import settings
from allauth.account.adapter import DefaultAccountAdapter
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter


class AccountAdapter(DefaultAccountAdapter):
    def is_open_for_signup(self, request):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)


class SocialAccountAdapter(DefaultSocialAccountAdapter):
    def is_open_for_signup(self, request, sociallogin):
        return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)
