post save user is inactive based on assigned user_group - Django Allauth
问题 I have two different user groups group_a and group_b. On register a user can choose the group he/she belongs to. I am using Django Allauth to handle all the user stuff so I've made a custom account adapter to handle the extra logic: custom_adapter.py class UserAccountAdapter(DefaultAccountAdapter): def save_user(self, request, user, form, commit=True): user = super(UserAccountAdapter, self).save_user(request, user, form, commit=False) user.voornaam = form.cleaned_data.get('first_name') user