mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
allauth working and integrated
This commit is contained in:
@@ -9,7 +9,11 @@ class AllAuthCustomAdapter(DefaultAccountAdapter):
|
||||
"""
|
||||
Whether to allow sign ups.
|
||||
"""
|
||||
allow_signups = super(
|
||||
AllAuthCustomAdapter, self).is_open_for_signup(request)
|
||||
# Override with setting, otherwise default to super.
|
||||
return getattr(settings, 'ACCOUNT_ALLOW_SIGNUPS', allow_signups)
|
||||
if request.resolver_match.view_name == 'account_signup':
|
||||
return False
|
||||
else:
|
||||
return super(AllAuthCustomAdapter, self).is_open_for_signup(request)
|
||||
|
||||
# disable password reset for now
|
||||
def send_mail(self, template_prefix, email, context):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user