[Answer]-How to clean username with Django allauth adapter?

1👍

I figured it out eventually. Was overthinking it.

from allauth.account.adapter import get_adapter

#...

    def clean_username(self):
        value = self.cleaned_data['username']
        value = get_adapter().clean_username(value)
        return value

Leave a comment