This template comes into play if a custom adaptor is used to disallow manual signup, e.g.
# adapters.py
from allauth.account.adapter import DefaultAccountAdapter
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
class CustomAccountAdapter(DefaultAccountAdapter):
def is_open_for_signup(self, request):
return False
class CustomSocialAccountAdapter(DefaultSocialAccountAdapter):
def is_open_for_signup(self, request, sociallogin):
return True
# settings.py
ACCOUNT_ADAPTER = 'myproject.myapp.adapter.CustomAccountAdapter'
SOCIALACCOUNT_ADAPTER = 'myproject.myapp.adapter.CustomSocialAccountAdapter'
For the above, signup using configured social accounts would be allowed, but manual signup would be disallowed and clicking 'signup' on any page would display the template included in this pull request (handled by django-allauth automatically based on the return value of is_open_for_signup).
Super helpful project, thanks for sharing!
This template comes into play if a custom adaptor is used to disallow manual signup, e.g.
For the above, signup using configured social accounts would be allowed, but manual signup would be disallowed and clicking 'signup' on any page would display the template included in this pull request (handled by django-allauth automatically based on the return value of is_open_for_signup).