Mailman: split the django_fedora module
Some imports need to read the config file, which creates a import loop.
This commit is contained in:
parent
a7a67a72ef
commit
f40ce9d969
4 changed files with 24 additions and 23 deletions
|
@ -13,19 +13,3 @@ def exclude_useless_errors(record):
|
|||
if isinstance(exc_value, excluded_class):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
# Disable local signup
|
||||
|
||||
from allauth.account.adapter import DefaultAccountAdapter
|
||||
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
|
||||
|
||||
class NoLocalSignUpAdapter(DefaultAccountAdapter):
|
||||
|
||||
def is_open_for_signup(self, request):
|
||||
return False
|
||||
|
||||
class SignUpEnabledSocialAdapter(DefaultSocialAccountAdapter):
|
||||
|
||||
def is_open_for_signup(self, request, sociallogin):
|
||||
return True
|
||||
|
|
14
roles/mailman/files/django_fedora_nosignup.py
Normal file
14
roles/mailman/files/django_fedora_nosignup.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Disable local signup
|
||||
|
||||
from allauth.account.adapter import DefaultAccountAdapter
|
||||
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
|
||||
|
||||
class NoLocalSignUpAdapter(DefaultAccountAdapter):
|
||||
|
||||
def is_open_for_signup(self, request):
|
||||
return False
|
||||
|
||||
class SignUpEnabledSocialAdapter(DefaultSocialAccountAdapter):
|
||||
|
||||
def is_open_for_signup(self, request, sociallogin):
|
||||
return True
|
Loading…
Add table
Add a link
Reference in a new issue