Skip to content

Question: Using a custom ACCOUNT_ADAPTER #270

@mscheper

Description

@mscheper

I'm using Django Invitations and AllAuth, and I want to set defaults on the sign-up page, based on a previously created table containing verified email addresses. I've thus subclassed BaseInvitationsAdapter and overridden new_user.

But I want Invitations to keep working, particularly the INVITATIONS_ACCEPT_INVITE_AFTER_SIGNUP setting. So it seems I should subclass Django Invitations' InvitationsAdapter. But that's only possible to import when ACCOUNT_ADAPTER == "invitations.models.InvitationsAdapter", so if I change INVITATIONS_ACCEPT_INVITE_AFTER_SIGNUP to my own subclass, that function will stop working (and the code won't run, since the superclass disappears).

I'm basically having the same issue as #99, but the solution to that seems a hack to me—that adapter must surely be 'hidden' for a reason. The code says InvitationsAdapter only exists for historic reasons, so I must've missed the contemporary way of doing it. I can't find it in the docs, though.

Could you point me to how, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions