django-invitations icon indicating copy to clipboard operation
django-invitations copied to clipboard

Override InvitationAdapter

Open dimkoug opened this issue 5 years ago • 3 comments

I want to override InvitationAdapter

Add get AttributeError: 'BaseInvitationsAdapter' object has no attribute 'get_user_signed_up_signal'

dimkoug avatar Jun 18 '19 11:06 dimkoug

i think in the simple authentication there is no signup signal, you can use login a user and than add after login signal

sajjadafridi avatar Dec 12 '19 18:12 sajjadafridi

For my particular case, I have created an "accounts" app where I put all my accounts related files. In the __init__.py for the app, I put the following delightful monkey patch 🙉

from invitations import adapters

def new_get_invitations_adapter():
	from allauth.account.adapter import get_adapter
	return get_adapter()

adapters.get_invitations_adapter = new_get_invitations_adapter

benopotamus avatar Aug 27 '22 11:08 benopotamus

Relates to #157

pbadeer avatar Nov 27 '22 02:11 pbadeer