[docs]classAuthenticationForm(BaseAuthenticationForm):"""Override the authentication form provided by Django"""
[docs]defclean(self):"""Lowercase the username"""if"username"inself.cleaned_data:self.cleaned_data["username"]=self.cleaned_data["username"].lower()super().clean()